guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 3a81584342a141eae3ffb8aaad636cdff82acc88
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Fri Nov 14 15:05:57 2025 +0000

    gnu: python-reproject: Clean up __pycache__ after tests.
    
    * gnu/packages/astronomy.scm (python-reproject)[arguments] <test-flags>:
    Remove unnecessary pytest options.  <phases>: Add 'post-check, removing
    __pycache__ from output.
    
    Change-Id: I9bcb571b597389db74f3ff5c3b90a6ca887deae7
---
 gnu/packages/astronomy.scm | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 7adaa803df..7f90496a7f 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -7643,7 +7643,7 @@ PSF} describing how the optical system spreads light from 
sources.")
 (define-public python-reproject
   (package
     (name "python-reproject")
-    (version "0.14.1") ;XXX: Newer versions need to be build with NumPy 2+
+    (version "0.14.1") ;XXX: Newer versions need to be built with NumPy 2+
     (source
      (origin
        (method url-fetch)
@@ -7658,19 +7658,21 @@ PSF} describing how the optical system spreads light 
from sources.")
       #~(list "--arraydiff"
               "--arraydiff-default-format=fits"
               "--numprocesses" (number->string (min 8 (parallel-job-count)))
-              "--pyargs" "reproject"
               ;; ValueError: Could not determine celestial frame corresponding
               ;; to the specified WCS object
               "-k" "not test_solar_wcs")
       #:phases
       #~(modify-phases %standard-phases
-          ;; Use built library for tests.
           (replace 'check
             (lambda* (#:key tests? test-flags #:allow-other-keys)
               (when tests?
                 (with-directory-excursion #$output
                   (setenv "HOME" "/tmp")
-                  (apply invoke "pytest" "-vv" test-flags))))))))
+                  (apply invoke "pytest" "-vv" test-flags)))))
+          (add-before 'check 'post-check
+            (lambda _
+              (for-each delete-file-recursively
+                        (find-files #$output "__pycache__" #:directories? 
#t)))))))
     (native-inputs
      (list python-cython
            python-extension-helpers

Reply via email to