From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egrBU-0003Ys-1s for guix-patches@gnu.org; Wed, 31 Jan 2018 07:08:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1egrBK-00068q-3y for guix-patches@gnu.org; Wed, 31 Jan 2018 07:08:12 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:42463) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1egrBJ-00068m-Vh for guix-patches@gnu.org; Wed, 31 Jan 2018 07:08:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1egrBJ-0004p2-Qe for guix-patches@gnu.org; Wed, 31 Jan 2018 07:08:01 -0500 Subject: [bug#30302] [[PATCH core-updates]] gnu: python-gevent: Update to 1.2.2. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37755) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1egrA8-0003Hk-Vp for guix-patches@gnu.org; Wed, 31 Jan 2018 07:06:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1egrA6-0005WA-8C for guix-patches@gnu.org; Wed, 31 Jan 2018 07:06:48 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:41049) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1egrA6-0005TP-1z for guix-patches@gnu.org; Wed, 31 Jan 2018 07:06:46 -0500 From: Marius Bakke Date: Wed, 31 Jan 2018 13:06:39 +0100 Message-Id: <20180131120639.7099-1-mbakke@fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 30302@debbugs.gnu.org * gnu/packages/python.scm (python-gevent): Update to 1.2.2. [source](snippet): Adjust to moved software bundles. Remove greentest substitution. [arguments]: Add #:modules. Add phases 'unpack-libev', 'patch-hard-coded-paths' and 'do-not-use-bundled-sources' and replace check phase with a custom command. [native-inputs]: Add LIBEV source. --- gnu/packages/python.scm | 65 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 55 insertions(+), 10 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 9d9870032..edc6ea4e4 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -26,7 +26,7 @@ ;;; Copyright © 2016, 2017 ng0 ;;; Copyright © 2016 Dylan Jeffers ;;; Copyright © 2016 David Craven -;;; Copyright © 2016, 2017 Marius Bakke +;;; Copyright © 2016, 2017, 2018 Marius Bakke ;;; Copyright © 2016, 2017 Stefan Reichör ;;; Copyright © 2016 Dylan Jeffers ;;; Copyright © 2016, 2017 Alex Vong @@ -8561,28 +8561,73 @@ are synchronized with data exchanges on \"channels\".") (define-public python-gevent (package (name "python-gevent") - (version "1.1.1") + (version "1.2.2") (source (origin (method url-fetch) (uri (pypi-uri "gevent" version)) (sha256 (base32 - "1smf3kvidpdiyi2c81alal74p2zm0clrm6xbyy6y1k9a3f2vkrbf")) + "0bbbjvi423y9k9xagrcsimnayaqymg6f2dj76m9z3mjpkjpci4a7")) (modules '((guix build utils))) (snippet '(begin ;; unbunding libev and c-ares - (for-each delete-file-recursively '("libev" "c-ares")) - ;; fixing testsuite - (call-with-output-file "greentest/__init__.py" noop) - (substitute* "greentest/testrunner.py" - (("import util") "from . import util") - (("from util import log") "from .util import log")))))) + (delete-file-recursively "deps") + #t)))) (build-system python-build-system) + (arguments + `(#:modules ((ice-9 ftw) + (srfi srfi-26) + (guix build utils) + (guix build python-build-system)) + #:phases (modify-phases %standard-phases + (add-after 'unpack 'unpack-libev + (lambda* (#:key inputs #:allow-other-keys) + (mkdir-p "deps/libev") + ;; FIXME: gevent requires building libev, even though + ;; it only links against the proper one. + (invoke "tar" "-xf" (assoc-ref inputs "libev-source") + "--strip-components=1" "-C" "deps/libev"))) + (add-before 'patch-source-shebangs 'patch-hard-coded-paths + (lambda _ + (substitute* "src/gevent/subprocess.py" + (("/bin/sh") (which "sh"))) + (for-each (lambda (file) + (substitute* file + (("/bin/sh") (which "sh")) + (("/bin/true") (which "true")))) + (find-files "src/greentest" "\\.py$")) + #t)) + (add-before 'build 'do-not-use-bundled-sources + (lambda _ + (setenv "CONFIG_SHELL" (which "bash")) + (setenv "LIBEV_EMBED" "false") + (setenv "CARES_EMBED" "false") + (setenv "EMBED" "false") + #t)) + (replace 'check + (lambda _ + ;; Make sure the build directory is on PYTHONPATH. + (setenv "PYTHONPATH" + (string-append + (getenv "PYTHONPATH") ":" + (getcwd) "/build/" + (car (scandir "build" (cut string-prefix? "lib." <>))))) + (with-directory-excursion "src/greentest" + ;; XXX: Many tests require network access. Instead we only + ;; run known-good tests. Unfortunately we cannot use + ;; recursion here since this directory also contains + ;; Python-version-specific subfolders. + (apply invoke "python" "testrunner.py" "--config" + "known_failures.py" + (scandir "." (cut regexp-exec + (make-regexp "test_+(subprocess|core)") + <>))))))))) (propagated-inputs `(("python-greenlet" ,python-greenlet))) (native-inputs - `(("python-six" ,python-six))) + `(("libev-source" ,(package-source libev)) + ("python-six" ,python-six))) (inputs `(("c-ares" ,c-ares) ("libev" ,libev))) -- 2.16.1