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

commit bb471e28c2aa68a43787cc39e004a9c3694db2e0
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Sat Jan 3 23:50:25 2026 +0000

    gnu: python-sncosmo: Adjust phases.
    
    * gnu/packages/astronomy.scm (python-sncosmo):
    [phases]{relax-requirements, prepare-test-environment}: Remove phases.
    {pre-check}: New phase, do not re-build extension just remove local
    source to reduce compute time.
    [native-inputs]: Remove python-wheel; add python-iminuit and
    python-pytest-xdist.
    
    Change-Id: I3b8642b1a55a1563640b1a5306614f2cb9ec5c2a
---
 gnu/packages/astronomy.scm | 57 ++++++++++++++++++++++------------------------
 1 file changed, 27 insertions(+), 30 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 306d486d98..5e95a0d2b4 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -8758,45 +8758,42 @@ framework of lens modelling software lenstronomy.")
     (build-system pyproject-build-system)
     (arguments
      (list
+      ;; tests: 83 passed, 4 skipped, 19 deselected
       #:test-flags
-      #~(list
-         ;; 23/27 tests fail requiring network access, ignore the whole file.
-         "--ignore=sncosmo/tests/test_builtins.py"
-         "-k" (string-join
-               ;; Tests require network access.
-               (list "not test_C11"
-                     "test_G10"
-                     "test_bandflux"
-                     "test_bandflux_multi"
-                     "test_bandflux_zpsys"
-                     "test_bandfluxcov"
-                     "test_bandmag"
-                     "test_compositemagsystem_band_error"
-                     "test_csp_magsystem"
-                     "test_megacampsf_bandpass"
-                     "test_salt2source_rcov_vs_snfit"
-                     "test_salt2source_timeseries_vs_snfit"
-                     "test_sugarsource"
-                     "test_ztf_bandpass")
-               " and not "))
+      ;; Network access is required.
+      #~(list "--ignore=tests/test_download_builtins.py"
+              "--ignore=tests/test_builtins.py"
+              "-k" (string-join
+                    (list "not test_C11"
+                          "test_G10"
+                          "test_bandflux"
+                          "test_bandflux_multi"
+                          "test_bandflux_zpsys"
+                          "test_bandfluxcov"
+                          "test_bandmag"
+                          "test_compositemagsystem_band_error"
+                          "test_csp_magsystem"
+                          "test_fit_lc_vs_snfit"
+                          "test_megacampsf_bandpass"
+                          "test_salt2source_rcov_vs_snfit"
+                          "test_salt2source_timeseries_vs_snfit"
+                          "test_sugarsource"
+                          "test_ztf_bandpass")
+                    " and not "))
       #:phases
       #~(modify-phases %standard-phases
-         (add-after 'unpack 'relax-requirements
-           (lambda _
-             (substitute* "setup.cfg"
-               ;; h5py>=3.11
-               (("3.11") "3.8.0"))))
-          (add-before 'check 'prepare-test-environment
+          (add-before 'check 'pre-check
             (lambda _
               (setenv "HOME" "/tmp")
-              (invoke "python" "setup.py" "build_ext" "--inplace"))))))
+              (copy-recursively "sncosmo/tests" "tests")
+              (delete-file-recursively "sncosmo" ))))))
     (native-inputs
-     (list ;; python-iminuit ; not packed, optional
+     (list python-iminuit
            python-cython
            python-pytest
+           python-pytest-xdist
            python-pytest-astropy
-           python-setuptools
-           python-wheel))
+           python-setuptools))
     (propagated-inputs
      (list python-astropy
            python-extinction

Reply via email to