diff mbox series

[bug#63542,11/19] gnu: python-astropy-healpix: Use Gexp.

Message ID e4a7c21503c86b35fb9da3d906acfe34fe9ada18.1684276665.git.sharlatanus@gmail.com
State New
Headers show
Series : gnu: astronomy: May updates. | expand

Commit Message

Sharlatan Hellseher May 16, 2023, 11:23 p.m. UTC
* gnu/packages/astronomy.scm (python-astropy-healpix): Simplify package
by using Gexp.
[build-system]: Shift to pyproject-build-system.
[arguments]{phases}: Shift to use standard check phase.
---
 gnu/packages/astronomy.scm | 28 ++++++++++++----------------
 1 file changed, 12 insertions(+), 16 deletions(-)
diff mbox series

Patch

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 25b372b06d..be4961b49e 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1243,23 +1243,19 @@  (define-public python-astropy-healpix
        (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