~ruther/guix-local

c8b16a15238ece85227a2029d031c8d93abfcd3c — Sharlatan Hellseher 1 year, 11 months ago d69afe6
gnu: python-cython-3: Update to 3.0.11.

Port test flags and check phase from python-cython to ease the process
of exclusion failing tests.

* gnu/packages/python-xyz.scm (python-cython-3): Update to 3.0.11.
[surce]: Adjust URI name as it changed in PyPI.
[build-system]: Swap to pyproject-build-system.
[native-inputs]: Add python-setuptools, and python-wheel.

Change-Id: I72b23a0e710a90fc78f93633319fb07edd0a8b20
1 files changed, 46 insertions(+), 3 deletions(-)

M gnu/packages/python-xyz.scm
M gnu/packages/python-xyz.scm => gnu/packages/python-xyz.scm +46 -3
@@ 8820,13 8820,56 @@ writing C extensions for Python as easy as Python itself.")
    ;; Cython 3 is not officially released yet, so distinguish the name
    ;; for now.
    (name "python-cython-next")
    (version "3.0.8")
    (version "3.0.11")
    (source (origin
              (method url-fetch)
              (uri (pypi-uri "Cython" version))
              (uri (pypi-uri "cython" version))
              (sha256
               (base32
                "1rlxscrn4bgdlbhjjikknbz5s2hyvn2rjfparry5wxnmiwyl4cw3"))))
                "1zzsn60cl1qcz11h6c3miqayb7yfxdm1x19i2fk4qav8z0mdsiki"))))
    (build-system pyproject-build-system)
    (arguments
     (list
      #:test-flags
      #~(list "-vv"
              "-j" (number->string (parallel-job-count))
              "-x" (string-join
                    (list "annotate_html"
                          "Debugger"
                          ;; It introduces cycle.
                          "numpy_test"
                          ;; It fails with AssertionError: Failed doctest test
                          ;; for complex_numbers_cpp.double_abs.
                          "complex_numbers_cpp"
                          ;; This test fails when running on 24 cores.
                          "cpp_stl_conversion"
                          ;; 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?))
                                 '("run.parallel")
                                 '())
                          #$@(if (system-hurd?)
                                 '("test_class_ref"
                                   "test_compiler_directives"
                                   "test_lang_version")
                                 '()))
                    "|"))
      #:phases
      #~(modify-phases %standard-phases
          (replace 'check
            (lambda* (#:key tests? test-flags #:allow-other-keys)
              ;; Disable compiler optimizations to greatly reduce the running
              ;; time of the test suite.
              (setenv "CFLAGS" "-O0")
              ;; Some tests require access to "$HOME/.cython".
              (setenv "HOME" "/tmp")
              (when tests?
                (apply invoke "python" "runtests.py" test-flags)))))))
    (native-inputs
     (list libxcrypt
           python-setuptools
           python-wheel))
    (properties '())))

;; NOTE: when upgrading numpy please make sure that python-numba,