aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/python.scm
diff options
context:
space:
mode:
authorCyril Roelandt <tipecaml@gmail.com>2014-03-03 01:53:11 +0100
committerCyril Roelandt <tipecaml@gmail.com>2014-03-25 14:41:32 +0100
commit9a9a3adf66285aba30effdb1565429357c7b6184 (patch)
tree2e776aef057f89e280a48754d50021ea83ad050e /gnu/packages/python.scm
parent70318b46722d4c11375148636d3cbae1f01114f1 (diff)
downloadguix-9a9a3adf66285aba30effdb1565429357c7b6184.tar
guix-9a9a3adf66285aba30effdb1565429357c7b6184.tar.gz
gnu: Enable tests in Python 3.
* gnu/packages/python.scm: enable tests for Python 3 * gnu/packages/python-fix-tests.patch: New file. * gnu/packages/gnu-system.am (dist_patch_DATA): add it.
Diffstat (limited to 'gnu/packages/python.scm')
-rw-r--r--gnu/packages/python.scm21
1 files changed, 20 insertions, 1 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 2c6992692a..01de2f6a4a 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -146,8 +146,17 @@
(substitute* "Lib/subprocess.py"
(("args = \\[\"/bin/sh")
(string-append "args = [\"" (which "sh"))))
+ (substitute*
+ '("Lib/distutils/tests/test_spawn.py"
+ "Lib/test/test_subprocess.py")
+ (("/bin/sh") (which "sh")))
(apply configure args)))
- %standard-phases))))
+ (alist-cons-before
+ 'check 'pre-check
+ (lambda _
+ ;; 'Lib/test/test_site.py' needs a valid $HOME
+ (setenv "HOME" (getcwd)))
+ %standard-phases)))))
(inputs
`(("bzip2" ,bzip2)
("gdbm" ,gdbm)
@@ -183,9 +192,19 @@ data types.")
(method url-fetch)
(uri (string-append "https://www.python.org/ftp/python/"
version "/Python-" version ".tar.xz"))
+ (patches (list (search-patch "python-fix-tests.patch")))
+ (patch-flags '("-p0"))
(sha256
(base32
"11f6hg9wdhm6hyzj49gxlvvp1s0l5hqgcsq1i4ayygqs1arpb4ik"))))
+ (arguments
+ (let ((args `(#:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1)
+ (srfi srfi-26))
+ ,@(package-arguments python-2))))
+ (substitute-keyword-arguments args
+ ((#:tests? _) #t))))
(native-search-paths
(list (search-path-specification
(variable "PYTHONPATH")