[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
58/72: gnu: python-gevent: Update to 24.11.1.
From: |
guix-commits |
Subject: |
58/72: gnu: python-gevent: Update to 24.11.1. |
Date: |
Thu, 26 Dec 2024 09:33:07 -0500 (EST) |
rekado pushed a commit to branch python-team
in repository guix.
commit 1a8b2baefa3a3b0bf23662de118c483e7224b703
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Thu Dec 19 15:19:57 2024 +0100
gnu: python-gevent: Update to 24.11.1.
* gnu/packages/python-xyz.scm (python-gevent): Update to 24.11.1.
[build-system]: Use pyproject-build-system.
[arguments]: Use #:test-flags; enable more tests; rename
'add-greenlet-on-C_INCLUDE_PATH to 'augment-C_INCLUDE_PATH.
[propagated-inputs]: Remove python-greenlet.
[native-inputs]: Add python-cffi, python-coverage, python-greenlet,
python-idna, python-requests, python-setuptools, and python-wheel.
[inputs]: Add libuv.
Change-Id: Idd09ca01caf2977783c5a05eac2817b5630df327
---
gnu/packages/python-xyz.scm | 175 +++++++++++++++++++++-----------------------
1 file changed, 82 insertions(+), 93 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index ee0ee06ada..79ecb4de4a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21800,13 +21800,13 @@ graphviz.")
(define-public python-gevent
(package
(name "python-gevent")
- (version "22.10.2")
+ (version "24.11.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "gevent" version))
(sha256
(base32
- "0ijwwm2yr7jgz8xs1rbvzj6gp7xw1pagf0i7g99b6dzffshiv80w"))
+ "1jhs1k49nfhv59c0li6bcpvkr6pzmxkdgfm56gns7r792j8l3lcb"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -21832,102 +21832,91 @@ graphviz.")
"_greenlet_primitives.c"
"_abstract_linkable.c")
(find-files "." "\\.html$"))))))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- `(#:modules ((ice-9 ftw)
- (ice-9 match)
- (srfi srfi-26)
- (guix build utils)
- (guix build python-build-system))
- #:phases (modify-phases %standard-phases
- (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$"))))
- (add-before 'build 'do-not-use-bundled-sources
- (lambda _
- (setenv "GEVENTSETUP_EMBED" "0")
-
- ;; Prevent building bundled libev.
- (substitute* "setup.py"
- (("run_make=_BUILDING")
- "run_make=False"))))
- (add-before 'build 'add-greenlet-on-C_INCLUDE_PATH
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((greenlet (string-append
- (assoc-ref inputs "python-greenlet")
- "/include")))
- (match (scandir greenlet
- (lambda (item)
- (string-prefix? "python" item)))
- ((python)
- (setenv "C_INCLUDE_PATH"
- (string-append greenlet "/" python ":"
- (or (getenv "C_INCLUDE_PATH")
- ""))))))))
- (add-before 'check 'pretend-to-be-CI
- (lambda _
- ;; A few tests are skipped due to network constraints or
- ;; get longer timeouts when running in a CI environment.
- ;; Piggy-back on that, as we need the same adjustments.
- (setenv "TRAVIS" "1")
- (setenv "APPVEYOR" "1")))
- (add-before 'check 'adjust-tests
- (lambda _
- (let ((disabled-tests
- '(;; These tests relies on networking which is
- ;; not available in the build container.
- "test__getaddrinfo_import.py"
- "test__server_pywsgi.py"
- ;; XXX: These tests borrow functionality from
the
- ;; Python builtin 'test' module, but it is not
- ;; installed with the Guix Python distribution.
- "test_smtpd.py"
- "test_wsgiref.py"
- "test_urllib2.py"
- "test_thread.py"
- "test_threading.py"
- "test__threading_2.py"
- ;; These tests rely on KeyboardInterrupts which
do not
- ;; work inside the build container for some
reason
- ;; (lack of controlling terminal?).
- "test_subprocess.py"
- "test__issues461_471.py"
- ;; TODO: Patch out the tests that use
getprotobyname, etc
- ;; instead of disabling all the tests from
these files.
- "test__resolver_dnspython.py"
- "test__doctests.py"
- "test__all__.py"
- "test___config.py"
- "test__execmodules.py"
- ;; This test contains 'test_unlink', which
- ;; fails on i686 (see:
- ;;
https://github.com/gevent/gevent/issues/1558).
- "test__core_stat.py")))
- (call-with-output-file "skipped_tests.txt"
- (lambda (port)
- (format port "~a~%"
- (string-join disabled-tests "\n")))))))
- (replace 'check
- (lambda _
- ;; Use the build daemons configured number of workers.
- (setenv "NWORKERS" (number->string (parallel-job-count)))
+ (list
+ #:test-flags
+ '(list
+ ;; These tests relies on networking which is
+ ;; not available in the build container.
+ "test__getaddrinfo_import.py"
+ ;; These tests rely on KeyboardInterrupts which do not
+ ;; work inside the build container for some reason
+ ;; (lack of controlling terminal?).
+ "test__issues461_471.py"
+ ;; TODO: Patch out the tests that use getprotobyname, etc
+ ;; instead of disabling all the tests from these files.
+ "test__resolver_dnspython.py"
+ ;; This test contains 'test_unlink', which
+ ;; fails on i686 (see: https://github.com/gevent/gevent/issues/1558).
+ "test__core_stat.py")
+ #:phases
+ #~(modify-phases %standard-phases
+ (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$"))))
+ (add-before 'build 'do-not-use-bundled-sources
+ (lambda _
+ (setenv "GEVENTSETUP_EMBED" "0")
- (invoke "python" "-m" "gevent.tests" "-unone" "--config"
- "known_failures.py" "--ignore"
"skipped_tests.txt"))))))
+ ;; Prevent building bundled libev.
+ (substitute* "setup.py"
+ (("run_make=_BUILDING")
+ "run_make=False"))))
+ (add-before 'build 'augment-C_INCLUDE_PATH
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((python (dirname (dirname
+ (search-input-file
+ inputs "bin/python"))))
+ (version (python-version python))
+ (greenlet (string-append
+ #$(this-package-native-input "python-greenlet")
+ "/include/python" version)))
+ (setenv "C_INCLUDE_PATH"
+ (string-append greenlet "/:"
+ (or (getenv "C_INCLUDE_PATH")
+ ""))))))
+ (add-before 'check 'pretend-to-be-CI
+ (lambda _
+ ;; A few tests are skipped due to network constraints or
+ ;; get longer timeouts when running in a CI environment.
+ ;; Piggy-back on that, as we need the same adjustments.
+ (setenv "TRAVIS" "1")
+ (setenv "APPVEYOR" "1")))
+ (add-before 'check 'adjust-tests
+ (lambda* (#:key test-flags #:allow-other-keys)
+ (call-with-output-file "skipped_tests.txt"
+ (lambda (port)
+ (format port "~a~%" (string-join test-flags "\n"))))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ ;; Use the build daemons configured number of workers.
+ (setenv "NWORKERS" (number->string (parallel-job-count)))
+ (invoke "python" "-m" "gevent.tests" "-unone" "--config"
+ "known_failures.py" "--ignore"
"skipped_tests.txt")))))))
(propagated-inputs
- (list python-greenlet python-zope-event python-zope-interface))
+ (list python-zope-event python-zope-interface))
(native-inputs
- (list python-cython
- ;; For tests.
- python-dnspython python-psutil python-objgraph))
+ (list python-cffi
+ python-coverage
+ python-cython
+ python-dnspython
+ python-greenlet
+ python-idna
+ python-objgraph
+ python-psutil
+ python-requests
+ python-setuptools
+ python-wheel))
(inputs
- (list c-ares libev))
+ (list c-ares libev libuv))
(home-page "https://www.gevent.org/")
(synopsis "Coroutine-based network library")
(description
- 37/72: gnu: python-typing-extensions: Update to 4.12.2., (continued)
- 37/72: gnu: python-typing-extensions: Update to 4.12.2., guix-commits, 2024/12/26
- 44/72: gnu: python-tox: Simplify., guix-commits, 2024/12/26
- 39/72: gnu: python-waitress: Update to 3.0.2., guix-commits, 2024/12/26
- 48/72: gnu: python-pydevd: Disable CI tests., guix-commits, 2024/12/26
- 49/72: gnu: python-stsci-stimage: Fix build., guix-commits, 2024/12/26
- 51/72: gnu: python-email-validator: Update to 2.2.0., guix-commits, 2024/12/26
- 55/72: gnu: python-pythran: Update to 0.17.0., guix-commits, 2024/12/26
- 56/72: gnu: python-pandas-2: Remove X., guix-commits, 2024/12/26
- 57/72: gnu: python-pandas-2: Restrict number of test processes., guix-commits, 2024/12/26
- 54/72: gnu: python-beniget: Update to 0.4.2.post1., guix-commits, 2024/12/26
- 58/72: gnu: python-gevent: Update to 24.11.1.,
guix-commits <=
- 63/72: gnu: python-httpretty: Enable tests., guix-commits, 2024/12/26
- 65/72: gnu: python-pydevd: Avoid test failures due to greendns., guix-commits, 2024/12/26
- 61/72: gnu: python-geventhttpclient: Update to 2.3.3., guix-commits, 2024/12/26
- 67/72: gnu: macs-3: Add missing input., guix-commits, 2024/12/26
- 70/72: gnu: python-pydantic-core: Update to 2.18.1., guix-commits, 2024/12/26
- 71/72: gnu: python-pydantic-2: Update to 2.7.0., guix-commits, 2024/12/26