From d06df41dfbbe125cb8ceb1c0f5a194cfeb52d22d Mon Sep 17 00:00:00 2001 From: Hartmut Goebel Date: Fri, 17 Jun 2016 21:45:12 +0200 Subject: gnu: wrap-python3: Create more symlinks. * gnu/pyckages/python.csm (wrap-python3): Create additional symlinks for pip and python-config. Signed-off-by: Andreas Enge --- gnu/packages/python.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 6ff1c5c9b2..0ffe72db78 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -379,8 +379,8 @@ data types.") (lambda (old new) (symlink (string-append python old) (string-append bin "/" new))) - '("python3" "pydoc3" "idle3") - '("python" "pydoc" "idle")))))) + `("python3" ,"pydoc3" ,"idle3" ,"pip3" ,"python3-config") + `("python" ,"pydoc" ,"idle" ,"pip" ,"python-config")))))) (synopsis "Wrapper for the Python 3 commands") (description "This package provides wrappers for the commands of Python@tie{}3.x such -- cgit v1.3 From f0499100a62e0b36ea31ad46021d30a9868b71ea Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sat, 20 Aug 2016 13:22:29 +0300 Subject: gnu: python-2: Update to 2.7.12. * gnu/packages/python.scm (python-2): Update to 2.7.12. [arguments]: Move the mips64el failing test ... [source]: ... to the snippet here. --- gnu/packages/python.scm | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index b96f1c4d72..67494234c9 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -105,7 +105,7 @@ (define-public python-2.7 (package (name "python") - (version "2.7.11") + (version "2.7.12") (source (origin (method url-fetch) @@ -113,7 +113,7 @@ version "/Python-" version ".tar.xz")) (sha256 (base32 - "0iiz844riiznsyhhyy962710pz228gmhv8qi3yk4w4jhmx2lqawn")) + "0y7rl603vmwlxm6ilkhc51rx2mfj14ckcz40xxgs0ljnvlhp30yp")) (patches (search-patches "python-2.7-search-paths.patch" "python-2-deterministic-build-info.patch" "python-2.7-source-date-epoch.patch")) @@ -125,6 +125,7 @@ '(begin (for-each delete-file '("Lib/test/test_compileall.py" + "Lib/test/test_ctypes.py" ; fails on mips64el "Lib/test/test_distutils.py" "Lib/test/test_import.py" "Lib/test/test_shutil.py" @@ -200,13 +201,6 @@ (lambda _ ;; 'Lib/test/test_site.py' needs a valid $HOME (setenv "HOME" (getcwd)) - ,@(if (string-prefix? "mips64el" (%current-system)) - - ;; XXX: The following test fails on mips64el. - '((false-if-exception - (delete-file "Lib/test/test_ctypes.py"))) - - '()) #t)) (add-after 'unpack 'set-source-file-times-to-1980 @@ -288,7 +282,7 @@ (list (search-path-specification (variable "PYTHONPATH") (files '("lib/python2.7/site-packages"))))) - (home-page "http://python.org") + (home-page "https://www.python.org") (synopsis "High-level, dynamically-typed programming language") (description "Python is a remarkably powerful dynamic programming language that -- cgit v1.3 From d0b73960db051baa468fc1a0fbab21fa9f89f885 Mon Sep 17 00:00:00 2001 From: Christopher Allan Webber Date: Mon, 20 Jun 2016 14:05:20 -0500 Subject: gnu: python-3.4: Update to 3.4.5. * gnu/packages/patches/python-disable-ssl-test.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. * gnu/packages/python.scm (python-3.4): Update to 3.4.5. [source]: Remove patch. [arguments]: Remove field. (python-minimal)[inputs]: Add libffi. --- gnu/local.mk | 1 - gnu/packages/patches/python-disable-ssl-test.patch | 12 ------------ gnu/packages/python.scm | 14 +++++--------- 3 files changed, 5 insertions(+), 22 deletions(-) delete mode 100644 gnu/packages/patches/python-disable-ssl-test.patch (limited to 'gnu/packages/python.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 26eacd1043..85ffd0091b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -748,7 +748,6 @@ dist_patch_DATA = \ %D%/packages/patches/python-3-deterministic-build-info.patch \ %D%/packages/patches/python-3-search-paths.patch \ %D%/packages/patches/python-dendropy-exclude-failing-tests.patch \ - %D%/packages/patches/python-disable-ssl-test.patch \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python-ipython-inputhook-ctype.patch \ %D%/packages/patches/python-rarfile-fix-tests.patch \ diff --git a/gnu/packages/patches/python-disable-ssl-test.patch b/gnu/packages/patches/python-disable-ssl-test.patch deleted file mode 100644 index e351c77505..0000000000 --- a/gnu/packages/patches/python-disable-ssl-test.patch +++ /dev/null @@ -1,12 +0,0 @@ -Disable a test that fails with openssl-1.0.2b. - ---- Lib/test/test_ssl.py.orig 2015-02-25 06:27:45.000000000 -0500 -+++ Lib/test/test_ssl.py 2015-06-12 03:14:09.395212502 -0400 -@@ -2718,6 +2718,7 @@ - chatty=True, connectionchatty=True) - self.assertIs(stats['compression'], None) - -+ @unittest.skipIf(True, "openssl 1.0.2b complains: dh key too small") - def test_dh_params(self): - # Check we can get a connection with ephemeral Diffie-Hellman - context = ssl.SSLContext(ssl.PROTOCOL_TLSv1) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c34a2495a6..71a20519ec 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -295,21 +295,19 @@ data types.") (define-public python-3.4 (package (inherit python-2) - (version "3.4.3") + (version "3.4.5") (source (origin (method url-fetch) (uri (string-append "https://www.python.org/ftp/python/" version "/Python-" version ".tar.xz")) (patches (search-patches "python-fix-tests.patch" - ;; XXX Try removing this patch for python > 3.4.3 - "python-disable-ssl-test.patch" "python-3-deterministic-build-info.patch" "python-3-search-paths.patch")) (patch-flags '("-p0")) (sha256 (base32 - "1f4nm4z08sy0kqwisvv95l02crv6dyysdmx44p1mz3bn6csrdcxm")))) + "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f")))) (arguments (substitute-keyword-arguments (package-arguments python-2) ((#:tests? _) #t))) (native-search-paths @@ -342,14 +340,12 @@ 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"))))) + ;; Build fails due to missing ctypes without libffi. ;; OpenSSL is a mandatory dependency of Python 3.x, for urllib; ;; zlib is required by 'zipimport', used by pip. - (inputs `(("openssl" ,openssl) + (inputs `(("libffi" ,libffi) + ("openssl" ,openssl) ("zlib" ,zlib))))) (define* (wrap-python3 python -- cgit v1.3 From 72df6680610050476b5fb309e92777d9519f45ef Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 21 Aug 2016 00:51:38 -0400 Subject: gnu: python-3: Update to python-3.5.2. * gnu/packages/patches/python-3.4-fix-tests.patch, gnu/packages/patches/python-3.5-fix-tests.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them. * gnu/packages/patches/python-fix-tests.patch: Move python-3.4 specific hunk to 'gnu/packages/patches/python-3.4-fix-tests.patch'. * gnu/packages/python.scm (python-3.5): New variable. (python-3.4): Inherit from python-3.5. [source]: Use 'gnu/packages/patches/python-3.4-fix-tests.patch'. (python-3): Point to python-3.5. Co-authored-by: Diane Trout Co-authored-by: Christopher Allan Webber --- gnu/local.mk | 2 ++ gnu/packages/patches/python-3.4-fix-tests.patch | 12 +++++++ gnu/packages/patches/python-3.5-fix-tests.patch | 46 +++++++++++++++++++++++++ gnu/packages/patches/python-fix-tests.patch | 15 -------- gnu/packages/python.scm | 26 +++++++++++--- 5 files changed, 82 insertions(+), 19 deletions(-) create mode 100644 gnu/packages/patches/python-3.4-fix-tests.patch create mode 100644 gnu/packages/patches/python-3.5-fix-tests.patch (limited to 'gnu/packages/python.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 85ffd0091b..1aada2a7b9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -747,6 +747,8 @@ dist_patch_DATA = \ %D%/packages/patches/python-2.7-source-date-epoch.patch \ %D%/packages/patches/python-3-deterministic-build-info.patch \ %D%/packages/patches/python-3-search-paths.patch \ + %D%/packages/patches/python-3.4-fix-tests.patch \ + %D%/packages/patches/python-3.5-fix-tests.patch \ %D%/packages/patches/python-dendropy-exclude-failing-tests.patch \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python-ipython-inputhook-ctype.patch \ diff --git a/gnu/packages/patches/python-3.4-fix-tests.patch b/gnu/packages/patches/python-3.4-fix-tests.patch new file mode 100644 index 0000000000..d1f8138e79 --- /dev/null +++ b/gnu/packages/patches/python-3.4-fix-tests.patch @@ -0,0 +1,12 @@ +--- Lib/test/test_posixpath.py 2014-03-01 05:46:56.984311000 +0100 ++++ Lib/test/test_posixpath.py 2014-03-07 00:59:20.888311000 +0100 +@@ -319,7 +319,11 @@ + del env['HOME'] + home = pwd.getpwuid(os.getuid()).pw_dir + # $HOME can end with a trailing /, so strip it (see #17809) +- self.assertEqual(posixpath.expanduser("~"), home.rstrip("/")) ++ # The Guix builders have '/' as a home directory, so ++ # home.rstrip("/") will be an empty string and the test will ++ # fail. Let's just disable it since it does not really make ++ # sense with such a bizarre setup. ++ # self.assertEqual(posixpath.expanduser("~"), home.rstrip("/")) diff --git a/gnu/packages/patches/python-3.5-fix-tests.patch b/gnu/packages/patches/python-3.5-fix-tests.patch new file mode 100644 index 0000000000..46d2a84efb --- /dev/null +++ b/gnu/packages/patches/python-3.5-fix-tests.patch @@ -0,0 +1,46 @@ +Additional test fixes which affect Python 3.5 (and presumably later) but not +prior revisions of Python. + +--- 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_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_asyncio/test_base_events.py ++++ Lib/test/test_asyncio/test_base_events.py +@@ -142,6 +142,8 @@ class BaseEventTests(test_utils.TestCase): + (INET, STREAM, TCP, '', ('1.2.3.4', 1)), + base_events._ipaddr_info('1.2.3.4', b'1', INET, STREAM, TCP)) + ++ @unittest.skipUnless(support.is_resource_enabled('network'), ++ 'network is not enabled') + def test_getaddrinfo_servname(self): + INET = socket.AF_INET + STREAM = socket.SOCK_STREAM diff --git a/gnu/packages/patches/python-fix-tests.patch b/gnu/packages/patches/python-fix-tests.patch index 82c19980f9..e093307c51 100644 --- a/gnu/packages/patches/python-fix-tests.patch +++ b/gnu/packages/patches/python-fix-tests.patch @@ -20,21 +20,6 @@ http://bugs.python.org/issue20868 . def test_tarfile_root_owner(self): tmpdir, tmpdir2, base_name = self._create_files() ---- Lib/test/test_posixpath.py 2014-03-01 05:46:56.984311000 +0100 -+++ Lib/test/test_posixpath.py 2014-03-07 00:59:20.888311000 +0100 -@@ -319,7 +319,11 @@ - del env['HOME'] - home = pwd.getpwuid(os.getuid()).pw_dir - # $HOME can end with a trailing /, so strip it (see #17809) -- self.assertEqual(posixpath.expanduser("~"), home.rstrip("/")) -+ # The Guix builders have '/' as a home directory, so -+ # home.rstrip("/") will be an empty string and the test will -+ # fail. Let's just disable it since it does not really make -+ # sense with such a bizarre setup. -+ # self.assertEqual(posixpath.expanduser("~"), home.rstrip("/")) - - def test_normpath(self): - self.assertEqual(posixpath.normpath(""), ".") --- Lib/test/test_socket.py.orig 2014-03-02 22:14:12.264311000 +0100 +++ Lib/test/test_socket.py 2014-03-21 03:50:45.660311000 +0100 @@ -819,6 +819,8 @@ diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 71a20519ec..a3df2dfdf8 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -293,21 +293,22 @@ data types.") ;; Current 2.x version. (define-public python-2 python-2.7) -(define-public python-3.4 +(define-public python-3.5 (package (inherit python-2) - (version "3.4.5") + (version "3.5.2") (source (origin (method url-fetch) (uri (string-append "https://www.python.org/ftp/python/" version "/Python-" version ".tar.xz")) (patches (search-patches "python-fix-tests.patch" + "python-3.5-fix-tests.patch" "python-3-deterministic-build-info.patch" "python-3-search-paths.patch")) (patch-flags '("-p0")) (sha256 (base32 - "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f")))) + "0h6a5fr7ram2s483lh0pnmc4ncijb8llnpfdxdcl5dxr01hza400")))) (arguments (substitute-keyword-arguments (package-arguments python-2) ((#:tests? _) #t))) (native-search-paths @@ -317,8 +318,25 @@ data types.") (version-major+minor version) "/site-packages")))))))) +(define-public python-3.4 + (package (inherit python-3.5) + (version "3.4.5") + (source (origin + (method url-fetch) + (uri (string-append "https://www.python.org/ftp/python/" + version "/Python-" version ".tar.xz")) + (patches (search-patches + "python-fix-tests.patch" + "python-3.4-fix-tests.patch" + "python-3-deterministic-build-info.patch" + "python-3-search-paths.patch")) + (patch-flags '("-p0")) + (sha256 + (base32 + "12l9klp778wklxmckhghniy5hklss8r26995pyd00qbllk4b2r7f")))))) + ;; Current 3.x version. -(define-public python-3 python-3.4) +(define-public python-3 python-3.5) ;; Current major version. (define-public python python-3) -- cgit v1.3 From 0cb59822680ea0c4765011c92fbda7367b4737b2 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 12 Oct 2016 13:21:04 -0400 Subject: gnu: python-kombu: Update to 3.0.37. * gnu/packages/python.scm (python-kombu, python2-kombu): Update to 3.0.37. [propagated-inputs]: Add python-redis. --- gnu/packages/python.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 26a9113297..464a129ce0 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8424,21 +8424,22 @@ alternative when librabbitmq is not available.") (define-public python-kombu (package (name "python-kombu") - (version "3.0.33") + (version "3.0.37") (source (origin (method url-fetch) (uri (pypi-uri "kombu" version)) (sha256 (base32 - "16brjx2lgwbj2a37d0pjbfb84nvld6irghmqrs3qfncajp51hgc5")))) + "0l16chb314gpq2v7fh94a22c30lcv6w3ylmhsa60bldlcq6a0r70")))) (build-system python-build-system) (native-inputs `(("python-mock" ,python-mock) ("python-nose" ,python-nose))) (propagated-inputs `(("python-anyjson" ,python-anyjson) - ("python-amqp" ,python-amqp))) + ("python-amqp" ,python-amqp) + ("python-redis" ,python-redis))) (home-page "http://kombu.readthedocs.org") (synopsis "Message passing library for Python") (description "The aim of Kombu is to make messaging in Python as easy as -- cgit v1.3 From a6bb9e446f4df3c220296041e08814a492494c2e Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 12 Oct 2016 13:21:40 -0400 Subject: gnu: python-billiard: Update to 3.3.0.23. * gnu/packages/python.scm (python-billiard, python2-billiard): Update to 3.3.0.23. --- gnu/packages/python.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 464a129ce0..a9783b62ad 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8463,14 +8463,14 @@ RabbitMQ messaging server is the most popular implementation.") (define-public python-billiard (package (name "python-billiard") - (version "3.3.0.22") + (version "3.3.0.23") (source (origin (method url-fetch) (uri (pypi-uri "billiard" version)) (sha256 (base32 - "0zp7h6a58alrb3mwdw61jds07395j4j0mj6iqsb8czrihw9ih5nj")))) + "02wxsc6bhqvzh8j6w758kvgqbnj14l796mvmrcms8fgfamd2lak9")))) (build-system python-build-system) (native-inputs `(("python-nose" ,python-nose))) -- cgit v1.3 From 9ebe87fe592682b3a3ba65974a2238f14a77cda2 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 12 Oct 2016 13:22:13 -0400 Subject: gnu: python-celery: Update to 3.1.24. * gnu/packages/python.scm (python-celery, python2-celery): Update to 3.1.24. [arguments]: Disable some tests with break with Python 3.5. --- gnu/packages/python.scm | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index a9783b62ad..f1bdee28b8 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8498,15 +8498,24 @@ Python 2.4 and 2.5, and will draw its fixes/improvements from python-trunk.") (define-public python-celery (package (name "python-celery") - (version "3.1.20") + (version "3.1.24") (source (origin (method url-fetch) (uri (pypi-uri "celery" version)) (sha256 (base32 - "1md6ywg1s0946qyp8ndnsd677wm0yax933h2sb4m3a4j7lf1jbyh")))) + "0yh2prhdnx2dgkb67a5drj12hh2zvzx5f611p7mqqg01ydghif4r")))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; These tests break with Python 3.5: + ;; https://github.com/celery/celery/issues/2897#issuecomment-253066295 + (replace 'check + (lambda _ + (zero? + (system* "nosetests" "--exclude=^test_safe_to_remove.*"))))))) (native-inputs `(("python-nose" ,python-nose))) (inputs -- cgit v1.3 From 470613f962dc93999c3505a2e84d3ab8016ffd8e Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 14 Oct 2016 16:55:02 -0400 Subject: gnu: python-cryptography: Ignore spurious test failure. * gnu/packages/python.scm (python-cryptography, python2-cryptography)[arguments]: Add 'disable-failing-test' phase. --- gnu/packages/python.scm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f1bdee28b8..1b35bf0807 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -6215,6 +6215,20 @@ responses, rather than doing any computation.") (base32 "1a85l548w5vvq3yhz0az7ajg2ijixzp6gagapw6wgrqvq28ghgs2")))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'disable-failing-test + (lambda _ + ;; This test is known to fail with OpenSSL >= 1.0.2i and older + ;; versions of python-cryptography: + ;; https://github.com/pyca/cryptography/issues/3196 + ;; TODO: Try re-enabling the test when upgrading + ;; python-cryptography. + (substitute* "tests/hazmat/backends/test_openssl.py" + (("def test_numeric_string_x509_name_entry") + "@pytest.mark.xfail\n def test_numeric_string_x509_name_entry")) + #t))))) (inputs `(("openssl" ,openssl))) (propagated-inputs -- cgit v1.3 From 2f87a77ff7fcd83c2de6b513eb49819e17232d95 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 15 Oct 2016 20:13:29 -0400 Subject: gnu: python2-file: Build with setuptools. * gnu/packages/python.scm (python-file)[properties]: New field. (python2-file): Use strip-python2-variant. [native-inputs]: Add python2-setuptools. --- gnu/packages/python.scm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 1b35bf0807..02ec731c40 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -6465,10 +6465,16 @@ Python's @code{ctypes} foreign function interface (FFI).") (synopsis "Python bindings to the libmagic file type guesser. Note that this module and the python-magic module both provide a \"magic.py\" file; these two modules, which are different and were developed separately, both -serve the same purpose: provide Python bindings for libmagic."))) +serve the same purpose: provide Python bindings for libmagic.") + (properties `((python2-variant . ,(delay python2-file)))))) (define-public python2-file - (package-with-python2 python-file)) + (let ((base (package-with-python2 (strip-python2-variant python-file)))) + (package + (inherit base) + (native-inputs + `(("python2-setuptools" ,python2-setuptools) + ,@(package-native-inputs base)))))) (define-public python-debian (package -- cgit v1.3 From ca0eee9df5b048dbf509a91c3b78a805fd1e2200 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 15 Oct 2016 22:16:30 -0400 Subject: gnu: python-execnet: Disable tests. The tests were silently skipped with Python 3.4. With Python 3.5, this caused the python-execnet build to fail. * gnu/packages/python.scm (python-execnet, python2-execnet)[arguments]: Disable tests. --- gnu/packages/python.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 02ec731c40..f6917ba86a 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -7311,8 +7311,14 @@ pure Python module that works on virtually all Python versions.") (base32 "1rpk1vyclhg911p3hql0m0nrpq7q7mysxnaaw6vs29cpa6kx8vgn")))) (build-system python-build-system) + (arguments + `(;; 2 failed, 275 passed, 670 skipped, 4 xfailed + ;; The two test failures are caused by the lack of an `ssh` executable. + ;; The test suite can be run with pytest after the 'install' phase. + #:tests? #f)) (native-inputs - `(("python-setuptools-scm" ,python-setuptools-scm))) + `(("python-pytest" ,python-pytest) + ("python-setuptools-scm" ,python-setuptools-scm))) (inputs `(("python-apipkg" ,python-apipkg))) (synopsis "Rapid multi-Python deployment") -- cgit v1.3 From a39cc016329f1f490ac7629fa81c9b686e7b0f4e Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 15 Oct 2016 22:41:42 -0400 Subject: gnu: python-ndg-httpsclient: Disable tests. The tests were silently skipped with Python 3.4. With Python 3.5, this caused the python-ndg-httpsclient build to fail. * gnu/packages/python.scm (python-ndg-httpsclient)[arguments]: Disable tests. --- gnu/packages/python.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f6917ba86a..032530c69d 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -7088,6 +7088,9 @@ be set via config files and/or environment variables.") (base32 "0x32ibixm3vv5m9xfk83xsqm8xcqw4dd0khbh6qbri6rxgymbhg8")))) (build-system python-build-system) + (arguments + '(;; The tests appear to require networking. + #:tests? #f)) (propagated-inputs `(("python-pyopenssl" ,python-pyopenssl))) (synopsis "HTTPS support for Python's httplib and urllib2") -- cgit v1.3 From 3969ca548c3230815242e95d07eee05d45b2947d Mon Sep 17 00:00:00 2001 From: 宋文武 Date: Sun, 16 Oct 2016 10:44:29 +0800 Subject: gnu: wrap-python3: Use a bash wrapper for 'python3-config'. See for details. * gnu/packages/python.scm (wrap-python3)[arguments]: Use a bash wrapper instead of a symlink for python3-config. --- gnu/packages/python.scm | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 032530c69d..e49d33635a 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -52,6 +52,7 @@ #:use-module (gnu packages adns) #:use-module (gnu packages attr) #:use-module (gnu packages backup) + #:use-module (gnu packages bash) #:use-module (gnu packages compression) #:use-module (gnu packages databases) #:use-module (gnu packages django) @@ -379,6 +380,7 @@ data types.") (source #f) (build-system trivial-build-system) (outputs '("out")) + (inputs `(("bash" ,bash))) (propagated-inputs `(("python" ,python))) (arguments `(#:modules ((guix build utils)) @@ -392,8 +394,20 @@ data types.") (lambda (old new) (symlink (string-append python old) (string-append bin "/" new))) - `("python3" ,"pydoc3" ,"idle3" ,"pip3" ,"python3-config") - `("python" ,"pydoc" ,"idle" ,"pip" ,"python-config")))))) + `("python3" ,"pydoc3" ,"idle3" ,"pip3") + `("python" ,"pydoc" ,"idle" ,"pip")) + ;; python-config outputs search paths based upon its location, + ;; use a bash wrapper to avoid changing its outputs. + (let ((bash (string-append (assoc-ref %build-inputs "bash") + "/bin/bash")) + (old (string-append python "python3-config")) + (new (string-append bin "/python-config"))) + (with-output-to-file new + (lambda () + (format #t "#!~a~%" bash) + (format #t "exec \"~a\" \"$@\"~%" old) + (chmod new #o755) + #t))))))) (synopsis "Wrapper for the Python 3 commands") (description "This package provides wrappers for the commands of Python@tie{}3.x such -- cgit v1.3 From 8757f05046dfc2423edc0345c6da21d2e0a6257e Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 16 Oct 2016 12:53:18 -0400 Subject: gnu: python-wsgi-intercept: Fix build failure with Python 3.5. * gnu/packages/python.scm (python-wsgi-intercept)[native-inputs]: Add python-urllib3. --- gnu/packages/python.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index e49d33635a..8d2195cefc 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -7439,7 +7439,8 @@ framework which enables you to test server connections locally.") (build-system python-build-system) (native-inputs `(("python-pytest" ,python-pytest) - ("python-six" ,python-six))) + ("python-six" ,python-six) + ("python-urllib3" ,python-urllib3))) (propagated-inputs `(("python-httplib2" ,python-httplib2) ("python-requests" ,python-requests))) -- cgit v1.3 From a9871b7b523eefba58645b20c88a2499119ca48e Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 16 Oct 2016 13:05:30 -0400 Subject: gnu: python-vobject: Disable the test suite. The tests were silently skipped with Python 3.4. With Python 3.5, this caused the python-vobject build to fail. * gnu/packages/python.scm (python-vobject, python2-vobject)[arguments]: Disable the tests. --- gnu/packages/python.scm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 8d2195cefc..7938f74b66 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8742,6 +8742,9 @@ introspection of @code{zope.interface} instances in code.") (base32 "1qfnwlx8qwkgr6nf5wvl6ff1r3kll53dh3z6nyp173nmlhhhqccb")))) (build-system python-build-system) + (arguments + '(;; The test suite relies on some non-portable Windows interfaces. + #:tests? #f)) (inputs `(("python-dateutil-2" ,python-dateutil-2) ("python-pyicu" ,python-pyicu))) -- cgit v1.3 From 66d3f50a76df00fffb6f241960c9bab48f91173d Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 16 Oct 2016 13:15:46 -0400 Subject: gnu: Add python-betamax. * gnu/packages/python.scm (python-betamax, python2-betamax): New variables. --- gnu/packages/python.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 7938f74b66..85330f8bdb 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -11082,3 +11082,35 @@ with an associated set of resolve methods that know how to fetch data.") provide extendible implementations of common aspects of a cloud so that you can focus on building massively scalable web applications.") (license license:expat))) + +(define-public python-betamax + (package + (name "python-betamax") + (version "0.8.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "betamax" version)) + (sha256 + (base32 + "18f8v5gng3j773jlbbzx4rg1i4y2zw3m2l1zpmbvp8bh5a2q1i42")))) + (build-system python-build-system) + (arguments + '(;; Many tests fail because they require networking. + #:tests? #f)) + (inputs + `(("python-requests" ,python-requests))) + (home-page "https://github.com/sigmavirus24/betamax") + (synopsis "Record HTTP interactions with python-requests") + (description "Betamax will record your test suite's HTTP interactions and +replay them during future tests. It is designed to work with python-requests.") + (license license:expat) + (properties `((python2-variant . ,(delay python2-betamax)))))) + +(define-public python2-betamax + (let ((base (package-with-python2 (strip-python2-variant python-betamax)))) + (package + (inherit base) + (native-inputs + `(("python2-setuptools" ,python2-setuptools) + ,@(package-native-inputs base)))))) -- cgit v1.3 From 759aadd46fdc8b9816c33667129d4e9bae310ba7 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 16 Oct 2016 13:18:12 -0400 Subject: gnu: python-requests-toolbelt: Fix build failure by adding missing dependencies. * gnu/packages/python.scm (python-requests-toolbelt)[native-inputs]: Add python-betamax, python-mock and python-pytest. --- gnu/packages/python.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 85330f8bdb..e0ead5075c 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -7240,6 +7240,10 @@ for atomic file system operations.") (base32 "15q9nrgp85nqlr4kdz1zvj8z2npafi2sr12y7fqgxbkq28j1aci6")))) (build-system python-build-system) + (native-inputs + `(("python-betamax" ,python-betamax) + ("python-mock" ,python-mock) + ("python-pytest" ,python-pytest))) (propagated-inputs `(("python-requests" ,python-requests))) (synopsis "Extensions to python-requests") -- cgit v1.3 From 00bf74be0578fda2cd662ee6dd75ee18c9112f48 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 17 Oct 2016 16:48:27 -0400 Subject: gnu: python-file: Don't create a compressed egg. * gnu/packages/python.scm (python-file, python2-file)[arguments]: Pass "--single-version-externally-managed" "--root=/" to #:configure-flags. --- gnu/packages/python.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index b5bc499f89..f91747903f 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -6462,6 +6462,7 @@ Python's @code{ctypes} foreign function interface (FFI).") (build-system python-build-system) (arguments '(#:tests? #f ;no tests + #:configure-flags '("--single-version-externally-managed" "--root=/") #:phases (modify-phases %standard-phases (add-before 'build 'change-directory (lambda _ -- cgit v1.3 From 7ffa5d4a2da7041712c9b6485923f2c3ee455f82 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 17 Oct 2016 20:12:32 -0400 Subject: gnu: python-file: Work around "double encoding" bug in file@5.28. * gnu/packages/patches/python-file-double-encoding-bug.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/python.scm (python-file)[source]: Use it. (python2-file)[source]: Use the source of FILE directly, without the patch. --- gnu/local.mk | 1 + .../patches/python-file-double-encoding-bug.patch | 50 ++++++++++++++++++++++ gnu/packages/python.scm | 5 +++ 3 files changed, 56 insertions(+) create mode 100644 gnu/packages/patches/python-file-double-encoding-bug.patch (limited to 'gnu/packages/python.scm') diff --git a/gnu/local.mk b/gnu/local.mk index cda33e1fb3..df86b94e86 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -780,6 +780,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-3.5-fix-tests.patch \ %D%/packages/patches/python-dendropy-exclude-failing-tests.patch \ %D%/packages/patches/python-django-fix-testcase.patch \ + %D%/packages/patches/python-file-double-encoding-bug.patch \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python-ipython-inputhook-ctype.patch \ %D%/packages/patches/python-rarfile-fix-tests.patch \ diff --git a/gnu/packages/patches/python-file-double-encoding-bug.patch b/gnu/packages/patches/python-file-double-encoding-bug.patch new file mode 100644 index 0000000000..bbe825c36a --- /dev/null +++ b/gnu/packages/patches/python-file-double-encoding-bug.patch @@ -0,0 +1,50 @@ +Fix bug that breaks file's Python bindings when using Python 3. This patch +should not be applied when using Python 2. + +Copied from upstream source repository: + +https://github.com/file/file/commit/73e043d2a986234b187a00ed0c8d1f7bf83df372 + +From 73e043d2a986234b187a00ed0c8d1f7bf83df372 Mon Sep 17 00:00:00 2001 +From: Christos Zoulas +Date: Tue, 28 Jun 2016 17:10:22 +0000 +Subject: [PATCH] PR/562: Reiner Herrmann: Avoid double encoding with python3 + +--- + python/magic.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/python/magic.py b/python/magic.py +index c48f7d5..b0f7a17 100644 +--- a/python/magic.py ++++ b/python/magic.py +@@ -134,7 +134,7 @@ class Magic(object): + if isinstance(r, str): + return r + else: +- return str(r).encode('utf-8') ++ return str(r, 'utf-8') + + def descriptor(self, fd): + """ +@@ -152,7 +152,7 @@ class Magic(object): + if isinstance(r, str): + return r + else: +- return str(r).encode('utf-8') ++ return str(r, 'utf-8') + + def error(self): + """ +@@ -163,7 +163,7 @@ class Magic(object): + if isinstance(e, str): + return e + else: +- return str(e).encode('utf-8') ++ return str(e, 'utf-8') + + def setflags(self, flags): + """ +-- +2.10.1 + diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f91747903f..559bdc69f0 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -6459,6 +6459,10 @@ Python's @code{ctypes} foreign function interface (FFI).") (package (inherit file) (name "python-file") + (source (origin + (inherit (package-source file)) + ;; This patch should not be applied to python2-file. + (patches (search-patches "python-file-double-encoding-bug.patch")))) (build-system python-build-system) (arguments '(#:tests? #f ;no tests @@ -6487,6 +6491,7 @@ serve the same purpose: provide Python bindings for libmagic.") (let ((base (package-with-python2 (strip-python2-variant python-file)))) (package (inherit base) + (source (package-source file)) (native-inputs `(("python2-setuptools" ,python2-setuptools) ,@(package-native-inputs base)))))) -- cgit v1.3 From fad8bf977d5443ac9ce9ac29a7a700f2c6170d40 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Wed, 26 Oct 2016 20:53:39 -0400 Subject: gnu: python-s3transfer: Run the tests. * gnu/packages/python.scm (python-s3transfer, python2-s3transfer)[arguments]: Use python-nose to run the tests. [native-inputs]: Add python-mock and python-nose. --- gnu/packages/python.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index ba1e0c424d..4215c3dc7f 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -11212,8 +11212,18 @@ replay them during future tests. It is designed to work with python-requests.") (base32 "1jivjkp3xqif9gzr5fiq28jsskmh50vzzd7ldsb4rbyiw1iyv3hy")))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + ;; 7 of the 'integration' tests require network access or login + ;; credentials. + (zero? (system* "nosetests" "--exclude=integration"))))))) (native-inputs - `(("python-docutils" ,python-docutils))) + `(("python-docutils" ,python-docutils) + ("python-mock" ,python-mock) + ("python-nose" ,python-nose))) (inputs `(("python-botocore" ,python-botocore))) (synopsis "Amazon S3 Transfer Manager") -- cgit v1.3 From 13c4d8746be63e8cd4b49c52bb9bbfc873b324dd Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Oct 2016 22:13:22 +0300 Subject: gnu: python-wtforms: Skip optional tests. * gnu/packages/python.scm (python-wtforms)[arguments]: Add a phase preventing tests from failing when optional tests aren't run. --- gnu/packages/python.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 4215c3dc7f..691c5deab0 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -8093,6 +8093,17 @@ python-xdo for newer bindings.)") (base32 "0vyl26y9cg409cfyj8rhqxazsdnd0jipgjw06civhrd53yyi1pzz")))) (build-system python-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'remove-django-test + ;; Don't fail the tests when the inputs for the optional tests cannot be found. + (lambda _ + (substitute* + "tests/runtests.py" + (("'ext_django.tests', 'ext_sqlalchemy', 'ext_dateutil', 'locale_babel'") "") + (("sys.stderr.write(\"### Disabled test '%s', dependency not found\n\" % name)") "")) + #t))))) (native-inputs `(("unzip" ,unzip))) (home-page "http://wtforms.simplecodes.com/") -- cgit v1.3 From aa6c09ed71acbc371731d56424ee403a69efb833 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Oct 2016 23:28:07 +0300 Subject: gnu: python-parse: Fix failing test. * gnu/packages/python.scm (python-parse)[origin]: Add patch. * gnu/packages/patches/python-parse-too-many-fields.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + .../patches/python-parse-too-many-fields.patch | 52 ++++++++++++++++++++++ gnu/packages/python.scm | 3 +- 3 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/python-parse-too-many-fields.patch (limited to 'gnu/packages/python.scm') diff --git a/gnu/local.mk b/gnu/local.mk index 083067c879..b62bedbead 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -793,6 +793,7 @@ dist_patch_DATA = \ %D%/packages/patches/python-file-double-encoding-bug.patch \ %D%/packages/patches/python-fix-tests.patch \ %D%/packages/patches/python-ipython-inputhook-ctype.patch \ + %D%/packages/patches/python-python-parse-too-many-fields.patch \ %D%/packages/patches/python-rarfile-fix-tests.patch \ %D%/packages/patches/python2-rdflib-drop-sparqlwrapper.patch \ %D%/packages/patches/python-statsmodels-fix-tests.patch \ diff --git a/gnu/packages/patches/python-parse-too-many-fields.patch b/gnu/packages/patches/python-parse-too-many-fields.patch new file mode 100644 index 0000000000..9db6b91a7f --- /dev/null +++ b/gnu/packages/patches/python-parse-too-many-fields.patch @@ -0,0 +1,52 @@ +From 32f15cfefb7c7b6476360ac65cba807aa3dfccfa Mon Sep 17 00:00:00 2001 +From: David King +Date: Mon, 14 Dec 2015 09:58:19 +0000 +Subject: [PATCH] Fix test_too_many_fields with Python 3.5 + +taken from https://github.com/r1chardj0n3s/parse/pull/34 + +Python versions before 3.5 had a limit of 100 groups in regular +expressions. This limit was removed during 3.5 development: + +http://bugs.python.org/issue22437 +https://hg.python.org/cpython/rev/0b85ea4bd1af + +The test_too_many_fields test asserts that the limit exists by +attempting to parse a string with 15 fields, which triggers the 100 +named groups limit. + +Adjust the test so that if first checks to see whether the limit of 100 +named groups exists, and only assert that parsing 15 fields fails if +that is the case. +--- + test_parse.py | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/test_parse.py b/test_parse.py +index c524349..1d50568 100755 +--- a/test_parse.py ++++ b/test_parse.py +@@ -6,6 +6,7 @@ + + import unittest + from datetime import datetime, time ++import re + + import parse + +@@ -624,8 +625,13 @@ def test_mixed_type_variant(self): + self.assertEqual(r.fixed[21], 'spam') + + def test_too_many_fields(self): +- p = parse.compile('{:ti}' * 15) +- self.assertRaises(parse.TooManyFields, p.parse, '') ++ # Python 3.5 removed the limit of 100 named groups in a regular expression, ++ # so only test for the exception if the limit exists. ++ try: ++ re.compile("".join("(?P{n}-)".format(n=i) for i in range(101))) ++ except AssertionError: ++ p = parse.compile('{:ti}' * 15) ++ self.assertRaises(parse.TooManyFields, p.parse, '') + + + class TestSearch(unittest.TestCase): diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 691c5deab0..a5fabd0e01 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1407,7 +1407,8 @@ backported for previous versions of Python from 2.4 to 3.3.") (uri (pypi-uri "parse" version)) (sha256 (base32 - "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi")))) + "0y31i3mwgv35qn0kzzjn9q8jqfdqmbi6sr6yfvn8rq4lqjm5lhvi")) + (patches (search-patches "python-parse-too-many-fields.patch")))) (build-system python-build-system) (arguments `(#:phases -- cgit v1.3 From f9a65318ddc34a84fea128b756d23ad619f519dc Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 27 Oct 2016 23:29:56 +0300 Subject: gnu: python-parse: Use 'modify-phases' syntax. * gnu/packages/python.scm (python-parse)[arguments]: Use 'modify-phases' syntax. --- gnu/packages/python.scm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index a5fabd0e01..73cabe8228 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1412,10 +1412,9 @@ backported for previous versions of Python from 2.4 to 3.3.") (build-system python-build-system) (arguments `(#:phases - (alist-replace - 'check - (lambda _ (zero? (system* "python" "test_parse.py"))) - %standard-phases))) + (modify-phases %standard-phases + (replace 'check + (lambda _ (zero? (system* "python" "test_parse.py"))))))) (home-page "https://github.com/r1chardj0n3s/parse") (synopsis "Parse strings") (description -- cgit v1.3 From 326f8285b35def19d4ce12ab9bb73d2b452c7760 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 29 Oct 2016 21:49:41 -0400 Subject: gnu: python-graphql-core: Disable the test suite. The tests were silently skipped with Python 3.4. With Python 3.5, this caused the build of python-graph-ql to fail. * gnu/packages/python.scm (python-graphql-core, python2-graphql-core)[arguments]: Disable the tests. --- gnu/packages/python.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9dde9d3952..06f813098f 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -11079,7 +11079,8 @@ CPU, load, memory, network bandwidth, disk I/O, disk use, and more.") "0rsaarx2sj4xnw9966rhh4haiqaapm4lm2mfqm48ywd51j5vh1a0")))) (build-system python-build-system) (arguments - `(#:phases + `(#:tests? #f ; Tests require the unpackaged pytest-benchmark. + #:phases (modify-phases %standard-phases (add-after 'unpack 'patch-hardcoded-version (lambda _ (substitute* -- cgit v1.3 From f34ef3317e6ee87c28e8832d15e59afe4f391f03 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 30 Oct 2016 17:04:24 +0100 Subject: gnu: python-joblib: Update to 0.10.3. * gnu/packages/python.scm (python-joblib): Update to 0.10.3. [native-inputs]: Add python-sphinx, python-docutils, python-numpydoc. --- gnu/packages/python.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 25e06e994b..c27137c540 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -2749,18 +2749,20 @@ logic-free templating system Mustache.") (define-public python-joblib (package (name "python-joblib") - (version "0.9.0b4") + (version "0.10.3") (source (origin (method url-fetch) - (uri (string-append "https://pypi.python.org/packages/source/" - "j/joblib/joblib-" version ".tar.gz")) + (uri (pypi-uri "joblib" version)) (sha256 (base32 - "1dvw3f8jgj6h0fxkghbgyclvdzc7l0ig7n0vis70awb5kczb9bs3")))) + "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9")))) (build-system python-build-system) (native-inputs `(("python-setuptools" ,python-setuptools) - ("python-nose" ,python-nose))) + ("python-nose" ,python-nose) + ("python-sphinx" ,python-sphinx) + ("python-docutils" ,python-docutils) + ("python-numpydoc" ,python-numpydoc))) (home-page "http://pythonhosted.org/joblib/") (synopsis "Using Python functions as pipeline jobs") (description -- cgit v1.3 From a8dd960ac0c68957dac281812f0d16f1295a6eaa Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sun, 30 Oct 2016 18:54:41 +0100 Subject: gnu: python-joblib: Disable failing tests. * gnu/packages/python.scm (python-joblib)[arguments]: Add phase to disable failing tests. --- gnu/packages/python.scm | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index c27137c540..9c7320f41e 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -2757,6 +2757,25 @@ logic-free templating system Mustache.") (base32 "0787k919zlfmgymprz5bzv0v1df5bbirlf3awrghmjgvkrd9dci9")))) (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'disable-failing-tests + (lambda _ + ;; This numpydoc tests fails for unknown reasons + (delete-file "doc/sphinxext/numpydoc/tests/test_docscrape.py") + ;; This numpydoc test depends on matplotlib, which is not a + ;; required input. + (delete-file "doc/sphinxext/numpydoc/tests/test_plot_directive.py") + ;; These tests fail to execute sys.executable + (substitute* "joblib/test/test_parallel.py" + (("import nose" line) + (string-append "from nose.plugins.skip import SkipTest\n" line)) + (("def test_nested_parallel_warnings" line) + (string-append "@SkipTest\n" line)) + (("def test_parallel_with_interactively_defined_functions" line) + (string-append "@SkipTest\n" line))) + #t))))) (native-inputs `(("python-setuptools" ,python-setuptools) ("python-nose" ,python-nose) -- cgit v1.3 From 0bc6ef2a87eb6501fb5925a1569a7c17a072f843 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 30 Oct 2016 18:32:11 -0400 Subject: gnu: Add python-pytest-2.9.2. * gnu/packages/python.scm (python-pytest-2.9.2): New variable. --- gnu/packages/python.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 5df774fd10..f971bb0cfc 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1665,6 +1665,31 @@ and many external plugins.") (define-public python2-pytest (package-with-python2 python-pytest)) +;; This package is used by Borg until we can upgrade all our Python packages to +;; use a more recent pytest. +(define-public python-pytest-2.9.2 + (package + (inherit python-pytest) + (name "python-pytest") + (version "2.9.2") + (source (origin + (method url-fetch) + (uri (pypi-uri "pytest" version)) + (sha256 + (base32 + "1n6igbc1b138wx1q5gca4pqw1j6nsyicfxds5n0b5989kaxqmh8j")))) + (arguments + `(#:phases + (modify-phases %standard-phases + (add-before 'check 'disable-invalid-test + (lambda _ + (substitute* "testing/test_argcomplete.py" + (("def test_remove_dir_prefix" line) + (string-append "@pytest.mark.skip" + "(reason=\"Assumes that /usr exists.\")\n " + line))) + #t))))))) + (define-public python-pytest-cov (package (name "python-pytest-cov") -- cgit v1.3 From 9422c98a0a2bf2c48d8e10e59d838ab23870eb10 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 5 Nov 2016 14:13:05 -0400 Subject: gnu: python-imagesize: Disable the test suite. * gnu/packages/python.scm (python-imagesize, python2-imagesize)[arguments]: Disable the tests. --- gnu/packages/python.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gnu/packages/python.scm') diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index f971bb0cfc..0daa921c4b 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -11607,6 +11607,10 @@ useful as a validator for JSON data.") (base32 "0qk07k0z4241lkzzjji7z4da04pcvg7bfc4xz1934zlqhwmwdcha")))) (build-system python-build-system) + (arguments + '(;; Test files are not distributed on PyPi: + ;; https://github.com/shibukawa/imagesize_py/issues/7 + #:tests? #f)) (home-page "https://github.com/shibukawa/imagesize_py") (synopsis "Gets image size of files in variaous formats in Python") (description -- cgit v1.3