gnu: python-cython-0: Update to 0.29.37.

* gnu/packages/python-xyz.scm (python-cython-0): Update to 0.29.37.
  Use G-expressions.
  [build-system]: Inherit pyproject form python-cython.
  [arguments] <test-backend>: Use 'custom; <test-flags>: Utilize it
  instead of overwriting 'check phase.
  <phases>: Add 'pre-check; use default 'check.
  [inputs]: Inherit from python-cython.
  [native-inputs]: Likewise.
  [home-page]: Likewise.
  [synopsis]: Likewise.
  [description]: Likewise.

Change-Id: I97e8662f0a53aa9bc702b835a347900c7ebd5ea1
This commit is contained in:
Sharlatan Hellseher 2025-07-20 16:27:26 +01:00
parent 349cda4632
commit ee5eb416dd
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -10158,55 +10158,44 @@ writing C extensions for Python as easy as Python itself.")
(define-public python-cython-0
(package
(inherit python-cython)
(version "0.29.32")
;; It's the latest version of 0.29. See
;; <https://github.com/cython/cython/blob/0.29.37/CHANGES.rst>.
(version "0.29.37")
(source
(origin
(method url-fetch)
(uri (pypi-uri "Cython" version))
(sha256
(base32 "1xqsihpqnfal29nb5kmw8z71nd4jbsnbz7p3lkr094xpb13wycw7"))))
(build-system python-build-system)
;; we need the full python package and not just the python-wrapper
;; because we need libpython3.3m.so
(inputs
(list python))
(native-inputs
;; Needed for some tests that link against it.
(list libxcrypt))
(base32 "1ysca2r23h12ai9wrym4ci0nvgwm3lfijrpj9xfyxbclvnkd84zq"))))
(arguments
`(#:phases
(modify-phases %standard-phases
(add-before 'check 'set-HOME
;; some tests require access to "$HOME/.cython"
(lambda _ (setenv "HOME" "/tmp")))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
;; Disable compiler optimizations to greatly reduce the running
;; time of the test suite.
(setenv "CFLAGS" "-O0")
(when tests?
(invoke "python" "runtests.py" "-vv"
(list
#:test-backend #~'custom
#:test-flags
#~(list "runtests.py"
"-vv"
"-j" (number->string (parallel-job-count))
;; XXX: On 32-bit architectures, running the parallel tests
;; fails on many-core systems, see
;; <https://github.com/cython/cython/issues/2807>.
,@(if (not (target-64bit?))
'("-x" "run.parallel")
'())
,@(if (system-hurd?)
'("-x" "test_class_ref"
#$@(if (not (target-64bit?))
#~("-x" "run.parallel")
#~())
#$@(if (system-hurd?)
#~("-x" "test_class_ref"
"-x" "test_compiler_directives"
"-x" "test_lang_version")
'())
#~())
;; This test fails when running on 24 cores.
"-x" "cpp_stl_conversion")))))))
(home-page "https://cython.org/")
(synopsis "C extensions for Python")
(description "Cython is an optimising static compiler for both the Python
programming language and the extended Cython programming language. It makes
writing C extensions for Python as easy as Python itself.")
(license license:asl2.0)))
"-x" "cpp_stl_conversion")
#:phases
#~(modify-phases %standard-phases
(add-before 'check 'pre-check
;; some tests require access to "$HOME/.cython"
(lambda _
(setenv "HOME" "/tmp")
;; Disable compiler optimizations to greatly reduce the running
;; time of the test suite.
(setenv "CFLAGS" "-O0"))))))))
;; Needed for scipy and numpy
(define-public python-cython-0.29.35