From ecd68c7702fc06a947eb8b550938dd00107b2e33 Mon Sep 17 00:00:00 2001 From: Diane Trout Date: Mon, 7 Mar 2016 21:07:21 -0800 Subject: [PATCH 1/2] Build python 3.5.1 This changes python-minimal to also use the system-ffi as without-system-ffi caused the build to fail trying to when trying to import _ctypes. --- gnu/packages/patches/python-fix-tests.patch | 33 +++++++++++++++++++++++++++++ gnu/packages/python.scm | 12 ++++------- 2 files changed, 37 insertions(+), 8 deletions(-) diff --git a/gnu/packages/patches/python-fix-tests.patch b/gnu/packages/patches/python-fix-tests.patch index 82c1998..1762531 100644 --- a/gnu/packages/patches/python-fix-tests.patch +++ b/gnu/packages/patches/python-fix-tests.patch @@ -1,6 +1,18 @@ See the discussion about the issues fixed here at: http://bugs.python.org/issue20868 . +--- Lib/test/test_pathlib.py 2014-03-01 03:02:36.088311000 +0100 ++++ Lib/test/test_pathlib.py 2014-03-01 04:56:37.768311000 +0100 +@@ -1986,8 +1986,9 @@ + expect = set() if not support.fs_is_case_insensitive(BASE) else given + self.assertEqual(given, expect) + self.assertEqual(set(p.rglob("FILEd*")), set()) + ++ @unittest.skipIf(True, "Guix builder home is '/' which causes trouble for these tests") + def test_expanduser(self): + P = self.cls + support.import_module('pwd') + import pwd --- Lib/test/test_shutil.py 2014-03-01 03:02:36.088311000 +0100 +++ Lib/test/test_shutil.py 2014-03-01 04:56:37.768311000 +0100 @@ -1053,6 +1053,7 @@ @@ -64,6 +76,27 @@ http://bugs.python.org/issue20868 . @unittest.skipUnless(support.is_resource_enabled('network'), 'network is not enabled') def test_idna(self): + +--- Lib/test/test_tarfile.py 2016-02-24 19:22:52.597208055 +0000 ++++ Lib/test/test_tarfile.py 2016-02-24 20:50:48.941950135 +0000 +@@ -2305,11 +2305,14 @@ + try: + import pwd, grp + except ImportError: + return False +- if pwd.getpwuid(0)[0] != 'root': +- return False +- if grp.getgrgid(0)[0] != 'root': ++ try: ++ if pwd.getpwuid(0)[0] != 'root': ++ return False ++ if grp.getgrgid(0)[0] != 'root': ++ return False ++ except KeyError: + return False + return True + + --- Lib/test/_test_multiprocessing.py 2014-04-06 23:12:27.575235000 +0200 +++ Lib/test/_test_multiprocessing.py 2014-04-06 23:13:04.827235000 +0200 @@ -1016,6 +1016,7 @@ diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 050f9e6..d8610a4 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -260,7 +260,7 @@ data types.") (define-public python (package (inherit python-2) - (version "3.4.3") + (version "3.5.1") (source (origin (method url-fetch) (uri (string-append "https://www.python.org/ftp/python/" @@ -268,13 +268,13 @@ data types.") (patches (map search-patch '("python-fix-tests.patch" ;; XXX Try removing this patch for python > 3.4.3 - "python-disable-ssl-test.patch" + ;; "python-disable-ssl-test.patch" "python-3-deterministic-build-info.patch" "python-3-search-paths.patch"))) (patch-flags '("-p0")) (sha256 (base32 - "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm")))) + "1j95yx32ggqx8jf13h3c8qfp34ixpyg8ipqcdjmn143d6q67rmf6")))) (arguments (substitute-keyword-arguments (package-arguments python-2) ((#:tests? _) #t))) (native-search-paths @@ -301,14 +301,10 @@ data types.") (package (inherit python) (name "python-minimal") (outputs '("out")) - (arguments - (substitute-keyword-arguments (package-arguments python) - ((#:configure-flags cf) - `(append ,cf '("--without-system-ffi"))))) - ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib; ;; zlib is required by 'zipimport', used by pip. (inputs `(("openssl" ,openssl) + ("libffi" ,libffi) ; for ctypes ("zlib" ,zlib))))) (define* (wrap-python3 python -- 2.6.3