[bug#76480,34/51] gnu: python-spherical-geometry: Remove bundled libqd source.

Message ID 8064377c24ecbd163493d73ca0c6ad71ced81377.1740173176.git.sharlatanus@gmail.com
State New
Headers
Series Astro update 2025/02 |

Commit Message

Sharlatan Hellseher Feb. 21, 2025, 9:49 p.m. UTC
  * gnu/packages/astronomy.scm (python-spherical-geometry) [source]
<snippet>: Delete bundled "libqd" source.
[arguments] <tests-flags>: Run all tests; add "--pyargs" options.
<phases>: Remove 'prepare-test-environment.

Change-Id: Id162e455b9369204ed8cb0545435c548cfbd2fad
---
 gnu/packages/astronomy.scm | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)
  

Patch

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 9df3e2f828f..636bcb8717e 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -5247,27 +5247,24 @@  (define-public python-spherical-geometry
              (commit version)))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "0znzfy3bmnsncvahf8qdav0c9403fn99d1gp25lainhv7kxfk44c"))))
+        (base32 "0znzfy3bmnsncvahf8qdav0c9403fn99d1gp25lainhv7kxfk44c"))
+       (modules '((guix build utils)))
+       (snippet
+        #~(begin
+            ;; Remove bundled library.
+            (delete-file-recursively "libqd")))))
     (build-system pyproject-build-system)
     (arguments
      (list
-      ;; XXX: Disable one failing test
-      ;; See https://github.com/spacetelescope/spherical_geometry/issues/252
-      #:test-flags #~(list "-k" "not test_overlap")
+      #:test-flags
+      #~(list "--pyargs" "spherical_geometry")
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'preparations
             (lambda _
               (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)
               ;; Use our own libraries in place of bundles.
-              (setenv "USE_SYSTEM_QD" "1")))
-          (add-before 'check 'prepare-test-environment
-            (lambda _
-              (invoke "python" "setup.py" "build_ext" "--inplace")
-              (call-with-output-file "pytest.ini"
-                (lambda (port)
-                  (format port "[pytest]
-python_files = test_*.py"))))))))
+              (setenv "USE_SYSTEM_QD" "1"))))))
     (native-inputs
      (list python-pytest
            python-pytest-astropy-header