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

commit 7acf450c3db7311ec0d2880ee025e2eb1c0ff99b
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Wed Jun 10 11:28:38 2026 +0100

    gnu: python-numexpr: Build from git.
    
    * gnu/packages/python-xyz.scm (python-numexpr):
    [source]: Switch to git-fetch.
    [arguments] <test-flags>: Tests from compiled and installed package.
    [phases]{check}: Do not overwrite and use default phase.
    {remove-local-source}: New phase.
    
    Change-Id: I01a7be4e54722273c3bb9c86dfecebe254b46f60
---
 gnu/packages/python-xyz.scm | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2024c19b04..2428e7465f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13004,21 +13004,23 @@ apply unified diffs.  It has features such as:
     (version "2.14.1")
     (source
      (origin
-       (method url-fetch)
-       (uri (pypi-uri "numexpr" version))
+       (method git-fetch)
+       (uri (git-reference
+              (url "https://github.com/pydata/numexpr";)
+              (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
        (sha256
-        (base32 "12xla8qkza3xjrqb2yc517z460mqnwi82m9i5v1sbdy7hq80pq2b"))))
+        (base32 "1zbpi7whjh6sccn1fndii735gv14kjaaqm3c3w1g2ry0z9948v9v"))))
     (build-system pyproject-build-system)
     (arguments
      (list
-      ;; tests: 6039 passed, 8 warnings
+      ;; tests: 6039 passed, 1 warning
+      #:test-flags #~(list "--pyargs" "numexpr")
       #:phases
       #~(modify-phases %standard-phases
-          (replace 'check
-            (lambda* (#:key tests? test-flags #:allow-other-keys)
-              (when tests?
-                (with-directory-excursion #$output
-                  (apply invoke "pytest" "-vv" test-flags))))))))
+          (add-before 'check 'remove-local-source
+            (lambda _
+              (delete-file-recursively "numexpr"))))))
     (native-inputs
      (list python-pytest
            python-setuptools))

Reply via email to