guix_mirror_bot pushed a commit to branch python-team
in repository guix.

commit 6b92c7def79ea901896813c45c265bc7467a49ac
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Fri Jul 11 16:25:05 2025 +0100

    gnu: python-cython-0: Improve style.
    
    * gnu/packages/python-xyz.scm (python-cython-0):
      [buld-system]: Use pyproject.
      [arguments] <test-backend>: Use 'custom.
      <test-flags>: Utilize it.
      <phases>: Remove 'set-HOME; add 'pre-check.
    
    Change-Id: I864fc998f82da656a2d2038d583d72236cecab07
---
 gnu/packages/python-xyz.scm | 60 ++++++++++++++++++++++++---------------------
 1 file changed, 32 insertions(+), 28 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f10b355b49..a582183ce0 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -10031,41 +10031,45 @@ writing C extensions for Python as easy as Python 
itself.")
   (package
     (inherit python-cython)
     (name "python-cython")
-    (version "0.29.37")         ;it's the latest version of 0.29
+    ;; 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 "1ysca2r23h12ai9wrym4ci0nvgwm3lfijrpj9xfyxbclvnkd84zq"))))
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
     (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"
-                       "-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"
-                               "-x" "test_compiler_directives"
-                               "-x" "test_lang_version")
-                             '())
-                       ;; This test fails when running on 24 cores.
-                       "-x" "cpp_stl_conversion")))))))))
+     (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"
+                        "-x" "test_compiler_directives"
+                        "-x" "test_lang_version")
+                     #~())
+              ;; This test fails when running on 24 cores.
+              "-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
 (define-public python-cython-0.29.35

Reply via email to