From 9a9a3adf66285aba30effdb1565429357c7b6184 Mon Sep 17 00:00:00 2001 From: Cyril Roelandt Date: Mon, 3 Mar 2014 01:53:11 +0100 Subject: 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. --- gnu/packages/python.scm | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 2c6992692a7..01de2f6a4a9 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") -- cgit v1.3