[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
58/65: gnu: python-gevent: Update to 24.11.1.
From: |
guix-commits |
Subject: |
58/65: gnu: python-gevent: Update to 24.11.1. |
Date: |
Fri, 20 Dec 2024 16:41:47 -0500 (EST) |
rekado pushed a commit to branch python-team
in repository guix.
commit 646639159e450f720d5ab44a08b29ceebf3316b5
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 fe5d365d30..e4c6eb149b 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21797,13 +21797,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
@@ -21829,102 +21829,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
- 07/65: gnu: python-cachetools: Update to 5.5.0., (continued)
- 07/65: gnu: python-cachetools: Update to 5.5.0., guix-commits, 2024/12/20
- 21/65: gnu: Add python-lazy., guix-commits, 2024/12/20
- 12/65: gnu: python-pytest-subprocess: Update to 1.5.2., guix-commits, 2024/12/20
- 24/65: gnu: Add python-devpi-server., guix-commits, 2024/12/20
- 26/65: gnu: Add python-devpi-process., guix-commits, 2024/12/20
- 45/65: gnu: python-pydantic: Fix build., guix-commits, 2024/12/20
- 49/65: gnu: python-stsci-stimage: Fix build., guix-commits, 2024/12/20
- 51/65: gnu: python-email-validator: Update to 2.2.0., guix-commits, 2024/12/20
- 40/65: gnu: python-uvicorn: Update to 0.34.0., guix-commits, 2024/12/20
- 57/65: gnu: python-pandas-2: Restrict number of test processes., guix-commits, 2024/12/20
- 58/65: gnu: python-gevent: Update to 24.11.1.,
guix-commits <=
- 62/65: gnu: python-dulwich: Update to 0.21.7., guix-commits, 2024/12/20
- 64/65: gnu: python-pydevd: Disable flaky tests., guix-commits, 2024/12/20
- 56/65: gnu: python-pandas-2: Remove X., guix-commits, 2024/12/20
- 03/65: gnu: python-statmake: Remove obsolete build phase., guix-commits, 2024/12/20
- 33/65: gnu: python-colorama: Update to 0.4.6., guix-commits, 2024/12/20
- 25/65: gnu: Add python-devpi-client., guix-commits, 2024/12/20
- 05/65: gnu: python-pyramid: Update to 2.0.2., guix-commits, 2024/12/20
- 29/65: gnu: python-zarr: Update to 2.18.4., guix-commits, 2024/12/20
- 38/65: gnu: python-devtools: Simplify., guix-commits, 2024/12/20
- 47/65: gnu: python-joblib: Disable one additional test., guix-commits, 2024/12/20