guix_mirror_bot pushed a commit to branch astro-update
in repository guix.

commit 24125738dcd621e1072b4642bbefce107ebd1d45
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Tue Jan 20 09:13:45 2026 +0000

    gnu: python-specutils: Improve package.
    
    * gnu/packages/astronomy.scm (python-specutils):
    [arguments] <test-flags>: Run tests from installed Python module with
    "--pyargs".
    [phases]{remove-local-source}: New phase.
    {set-home-env}: Move before {build}.
    
    Change-Id: I1a8a894946e2961a46d3665e13861ad1dfd35236
---
 gnu/packages/astronomy.scm | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 47a9cc1534..1d3105f56f 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -9574,19 +9574,23 @@ of axis order, spatial projections, and spectral units 
that exist in the wild.
     (build-system pyproject-build-system)
     (arguments
      (list
-      ;; 572 passed, 131 skipped, 3 xfailed
+      ;; tests: 559 passed, 130 skipped, 1 deselected, 3 xfailed
       #:test-flags
-      ;; Disabling test requiring access to download
-      ;; <https://datacenter.iers.org/data/9/finals2000A.all>.
-      ;; XXX: Check if test data may be packed as standalone package.
-      #~(list "-k" "not test_create_spectral_axis")
+      #~(list "--pyargs" "specutils"
+              ;; Disabling test requiring access to download
+              ;; <https://datacenter.iers.org/data/9/finals2000A.all>.
+              ;; XXX: Check if test data may be packed as standalone package.
+              
"--deselect=tests/test_spectral_axis.py::test_create_spectral_axis")
       #:phases
       #~(modify-phases %standard-phases
-          (add-before 'check 'set-home-env
+          (add-before 'build 'set-home-env
             (lambda _
               ;; Tests require HOME to be set.
               ;;  Permission denied: '/homeless-shelter'
-              (setenv "HOME" "/tmp"))))))
+              (setenv "HOME" "/tmp")))
+          (add-before 'check 'remove-local-source
+            (lambda _
+              (delete-file-recursively "specutils"))))))
     (native-inputs
      (list python-matplotlib
            python-pytest-asdf-plugin

Reply via email to