aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Bavier <bavier@member.fsf.org>2014-11-17 19:36:01 -0600
committerEric Bavier <bavier@member.fsf.org>2014-12-02 08:33:31 -0600
commitb88e1b0a626aa434e3934732392140dc9e919dd6 (patch)
tree2f879006bb12bec7deb345bcc69b522f08c3ebb5
parent7639105b1270dd8063c97e822276104595207211 (diff)
downloadguix-b88e1b0a626aa434e3934732392140dc9e919dd6.tar
guix-b88e1b0a626aa434e3934732392140dc9e919dd6.tar.gz
gnu: python: Add sqlite input.
* gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch, gnu/packages/patches/python2-sqlite-3.8.4-test-fix.patch: New patches. * gnu-system.am (dist_patch_DATA): Add them. * gnu/packages/python.scm (python-2)[source]: Add patch. [inputs]: Add sqlite. (python)[source]: Add patch.
-rw-r--r--gnu-system.am2
-rw-r--r--gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch15
-rw-r--r--gnu/packages/patches/python2-sqlite-3.8.4-test-fix.patch15
-rw-r--r--gnu/packages/python.scm8
4 files changed, 39 insertions, 1 deletions
diff --git a/gnu-system.am b/gnu-system.am
index f7532f0164..161580f43f 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -417,6 +417,8 @@ dist_patch_DATA = \
gnu/packages/patches/pybugz-stty.patch \
gnu/packages/patches/python-fix-tests.patch \
gnu/packages/patches/python-libffi-mips-n32-fix.patch \
+ gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch \
+ gnu/packages/patches/python2-sqlite-3.8.4-test-fix.patch \
gnu/packages/patches/qt4-tests.patch \
gnu/packages/patches/ratpoison-shell.patch \
gnu/packages/patches/readline-link-ncurses.patch \
diff --git a/gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch b/gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch
new file mode 100644
index 0000000000..2f8b159870
--- /dev/null
+++ b/gnu/packages/patches/python-sqlite-3.8.4-test-fix.patch
@@ -0,0 +1,15 @@
+From resolution of upstream python issue #20901: http://bugs.python.org/issue20901
+
+diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py
+--- Lib/sqlite3/test/hooks.py
++++ Lib/sqlite3/test/hooks.py
+@@ -162,7 +162,7 @@ class ProgressTests(unittest.TestCase):
+ create table bar (a, b)
+ """)
+ second_count = len(progress_calls)
+- self.assertGreater(first_count, second_count)
++ self.assertGreaterEqual(first_count, second_count)
+
+ def CheckCancelOperation(self):
+ """
+
diff --git a/gnu/packages/patches/python2-sqlite-3.8.4-test-fix.patch b/gnu/packages/patches/python2-sqlite-3.8.4-test-fix.patch
new file mode 100644
index 0000000000..f121e8852a
--- /dev/null
+++ b/gnu/packages/patches/python2-sqlite-3.8.4-test-fix.patch
@@ -0,0 +1,15 @@
+From resolution of upstream python issue #20901: http://bugs.python.org/issue20901
+
+diff --git a/Lib/sqlite3/test/hooks.py b/Lib/sqlite3/test/hooks.py
+--- Lib/sqlite3/test/hooks.py
++++ Lib/sqlite3/test/hooks.py
+@@ -162,7 +162,7 @@ class ProgressTests(unittest.TestCase):
+ create table bar (a, b)
+ """)
+ second_count = len(progress_calls)
+- self.assertTrue(first_count > second_count)
++ self.assertGreaterEqual(first_count, second_count)
+
+ def CheckCancelOperation(self):
+ """
+
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 88f892799f..de60dca0a0 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -65,7 +65,8 @@
(method url-fetch)
(uri (string-append "https://www.python.org/ftp/python/"
version "/Python-" version ".tar.xz"))
- (patches (list (search-patch "python-libffi-mips-n32-fix.patch")))
+ (patches (list (search-patch "python-libffi-mips-n32-fix.patch")
+ (search-patch "python2-sqlite-3.8.4-test-fix.patch")))
(patch-flags '("-p0"))
(sha256
(base32
@@ -119,6 +120,7 @@
(let ((bz2 (assoc-ref %build-inputs "bzip2"))
(gdbm (assoc-ref %build-inputs "gdbm"))
(libffi (assoc-ref %build-inputs "libffi"))
+ (sqlite (assoc-ref %build-inputs "sqlite"))
(openssl (assoc-ref %build-inputs "openssl"))
(readline (assoc-ref %build-inputs "readline"))
(zlib (assoc-ref %build-inputs "zlib")))
@@ -127,6 +129,7 @@
(string-append "CPPFLAGS="
"-I" bz2 "/include "
"-I" gdbm "/include "
+ "-I" sqlite "/include "
"-I" openssl "/include "
"-I" readline "/include "
"-I" zlib "/include")
@@ -134,6 +137,7 @@
"-L" bz2 "/lib "
"-L" gdbm "/lib "
"-L" libffi "/lib "
+ "-L" sqlite "/lib "
"-L" openssl "/lib "
"-L" readline "/lib "
"-L" zlib "/lib")))
@@ -177,6 +181,7 @@
`(("bzip2" ,bzip2)
("gdbm" ,gdbm)
("libffi" ,libffi) ; for ctypes
+ ("sqlite" ,sqlite) ; for sqlite extension
("openssl" ,openssl)
("readline" ,readline)
("zlib" ,zlib)
@@ -208,6 +213,7 @@ data types.")
(uri (string-append "https://www.python.org/ftp/python/"
version "/Python-" version ".tar.xz"))
(patches (list (search-patch "python-fix-tests.patch")
+ (search-patch "python-sqlite-3.8.4-test-fix.patch")
(search-patch "python-libffi-mips-n32-fix.patch")))
(patch-flags '("-p0"))
(sha256