summary refs log tree commit diff
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2023-05-24 22:51:45 +0100
committerVinicius Monego <monego@posteo.net>2023-05-25 21:20:05 -0300
commit3c17950affc16215827b6d5cbd7c5eb5cd9d76a6 (patch)
tree36f70b57e6ddbfe9e6e81960ad6bdaaa8121e1a4
parent2e501ccc03a70ce546c1885951f131d711c93b59 (diff)
downloadguix-3c17950affc16215827b6d5cbd7c5eb5cd9d76a6.tar.gz
gnu: python-astropy-healpix: Switch to pyproject-build-system.
* gnu/packages/astronomy.scm (python-astropy-healpix)[build-system]: Switch to
pyproject-build-system.
[arguments]: Do not override the 'check phase.  Use G-Expressions.

Signed-off-by: Vinicius Monego <monego@posteo.net>
-rw-r--r--gnu/packages/astronomy.scm28
1 files changed, 12 insertions, 16 deletions
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 2c99d1051c..ace762e518 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1243,23 +1243,19 @@ astronomy and astrophysics.")
        (uri (pypi-uri "astropy_healpix" version))
        (sha256
         (base32 "1n1svmd41iv944zf4anbnsigd47zr4dfjf49vrc7m6928gmq9hw8"))))
-    (build-system python-build-system)
+    (build-system pyproject-build-system)
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         ;; This file is opened in both install and check phases.
-         (add-before 'install 'writable-compiler
-           (lambda _ (make-file-writable "astropy_healpix/_compiler.c")))
-         (add-before 'check 'writable-compiler
-           (lambda _ (make-file-writable "astropy_healpix/_compiler.c")))
-         (replace 'check
-           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
-             (when tests?
-               (add-installed-pythonpath inputs outputs)
-               ;; Extensions have to be rebuilt before running the tests.
-               (invoke "python" "setup.py" "build_ext" "--inplace")
-               (invoke "python" "-m" "pytest"
-                       "--pyargs" "astropy_healpix")))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; This file is opened in both install and check phases.
+          (add-before 'install 'writable-compiler
+            (lambda _ (make-file-writable "astropy_healpix/_compiler.c")))
+          (add-before 'check 'prepare-test-environment
+            (lambda _
+              ;; Extensions have to be rebuilt before running the tests.
+              (invoke "python" "setup.py" "build_ext" "--inplace")
+              (make-file-writable "astropy_healpix/_compiler.c"))))))
     (native-inputs
      (list python-extension-helpers
            python-hypothesis