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

commit 862f17e630c50a97fb279206d9715958f28c44e0
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Sat Jun 27 22:01:24 2026 +0100

    gnu: python-numcodecs: Update to 0.15.1.
    
    * gnu/packages/python-xyz.scm (python-numcodecs): Update to
    0.15.1. Apply G-Expressions.
    [source]: Switch to git-fetch.
    [phases] {build-extensions}: Remove phase.
    {check}: Use custom phase.
    {substitute-git-submodules}: New phase.
    [propagated-inputs]: Remove python-google-crc32c and
    python-importlib-metadata; add python-deprecated.
    [native-inputs]: Remove python-pydata-sphinx-theme, python-sphinx, and
    python-sphinx-issues.
---
 gnu/packages/python-xyz.scm | 88 +++++++++++++++++++++++----------------------
 1 file changed, 45 insertions(+), 43 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f8304e2fb4..0ef9b2e613 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -28354,16 +28354,16 @@ tool).")
 (define-public python-numcodecs
   (package
     (name "python-numcodecs")
-    (version "0.13.1")
-    ;; python-zarr does not want versions 0.14.0 or 0.14.1.
-    ;;(version "0.14.1")
+    (version "0.15.1")  ;newer version needs c-blosc 1.26+
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "numcodecs" version))
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/zarr-developers/numcodecs";)
+              (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32
-         "1g09fwhgmhmw66x5gzmzhm8yhgqki3gpfi0dkhx8z2gh3n43gkx3"))
+        (base32 "19i30k4zn6rjqlrfk20yh75r1di3j7mli2mn9n3pyxmwaq7hiasz"))
        (modules '((guix build utils)))
        (snippet
         '(begin
@@ -28378,48 +28378,50 @@ tool).")
     (build-system pyproject-build-system)
     (arguments
      (list
-      #:test-flags
-      ;; zarr isn't available, because it dependes on this package.
-      '(list "-k" "not test_zarr3_import")
+      ;; tests: 714 passed, 39 skipped, 36 xfailed, 20 warnings
       #:phases
-      '(modify-phases %standard-phases
-         (add-after 'unpack 'disable-avx2
-           (lambda _
-             (setenv "DISABLE_NUMCODECS_AVX2" "1")))
-         (add-after 'unpack 'unbundle
-           (lambda _
-             (substitute* "setup.py"
-               (("sources=sources \\+ blosc_sources,")
-                "sources=sources,")
-               (("extra_compile_args=extra_compile_args")
-                "extra_compile_args=list(base_compile_args)")
-               (("'numcodecs.zstd',")
-                "'numcodecs.zstd', libraries=['zstd'], ")
-               (("'numcodecs.lz4',")
-                "'numcodecs.lz4', libraries=['lz4'], ")
-               (("'numcodecs.blosc',")
-                "'numcodecs.blosc', libraries=['blosc'], "))))
-         (add-before 'check 'build-extensions
-           (lambda _
-             ;; Cython extensions have to be built before running the tests.
-             (invoke "python" "setup.py" "build_ext" "--inplace"))))))
-    (inputs
-     (list c-blosc lz4 zlib
-           `(,zstd "lib")))
-    (propagated-inputs
-     (list python-google-crc32c
-           python-importlib-metadata
-           python-msgpack
-           python-numpy))
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'disable-avx2
+            (lambda _
+              (setenv "DISABLE_NUMCODECS_AVX2" "1")))
+          (add-after 'unpack 'unbundle
+            (lambda _
+              (substitute* "setup.py"
+                (("sources=sources \\+ blosc_sources,")
+                 "sources=sources,")
+                (("extra_compile_args=extra_compile_args")
+                 "extra_compile_args=list(base_compile_args)")
+                (("'numcodecs.zstd',")
+                 "'numcodecs.zstd', libraries=['zstd'], ")
+                (("'numcodecs.lz4',")
+                 "'numcodecs.lz4', libraries=['lz4'], ")
+                (("'numcodecs.blosc',")
+                 "'numcodecs.blosc', libraries=['blosc'], "))))
+          (add-before 'build 'substitute-git-submodules
+            (lambda _
+              (symlink #$(package-source (this-package-input "c-blosc"))
+                       "c-blosc")))
+          (replace 'check
+            (lambda* (#:key tests? test-flags #:allow-other-keys)
+              (with-directory-excursion #$output
+                (apply invoke "pytest" "-vv" test-flags)
+                (delete-file-recursively ".pytest_cache")))))))
     (native-inputs
      (list python-cython
            python-py-cpuinfo
-           python-pydata-sphinx-theme
            python-pytest
            python-setuptools
-           python-setuptools-scm ;for correct version
-           python-sphinx
-           python-sphinx-issues))
+           python-setuptools-scm))
+    (inputs
+     (list c-blosc
+           lz4
+           zlib
+           (list zstd "lib")))
+    (propagated-inputs
+     (list python-deprecated
+           python-numpy
+           ;; [optional]
+           python-msgpack))
     (home-page "https://github.com/zarr-developers/numcodecs";)
     (synopsis "Buffer compression and transformation codecs")
     (description

Reply via email to