guix_mirror_bot pushed a commit to branch master
in repository guix.
commit f690a8b0bf6a52e7cb553139a5442c25ee20230c
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Thu Nov 13 19:45:19 2025 +0000
gnu: python-pyregion: Simplify and improve package.
* gnu/packages/astronomy.scm (python-pyregion)[arguments] <phases>:
Remove 'create-setup.py, and 'build-extension; use custom 'check; add
'post-check.
[native-inputs]: Remove python-pytest-astropy-header and python-wheel.
Change-Id: Id36c316c4ad54cea34df4224ef8f66dad282cbb2
---
gnu/packages/astronomy.scm | 31 ++++++++++++-------------------
1 file changed, 12 insertions(+), 19 deletions(-)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 7f90496a7f..c039e34984 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -6967,32 +6967,25 @@ N-Chilada and RAMSES AMR outputs.")
(list
#:phases
#~(modify-phases %standard-phases
- ;; setup.py was removed in b26ec4fe88e29447dc8391fcdef7082a4f7876ce
- ;; TODO: Check how to implement it in python-build-system.
- (add-after 'unpack 'create-setup.py
- (lambda _
- (call-with-output-file "setup.py"
- (lambda (port)
- (format port "from setuptools import setup
-from extension_helpers import get_extensions
-setup(ext_modules=get_extensions())")))))
- (add-before 'check 'build-extensions
+ (replace 'check
+ (lambda* (#:key tests? test-flags #:allow-other-keys)
+ (with-directory-excursion #$output
+ (apply invoke "pytest" "-vv" test-flags))))
+ (add-before 'check 'post-check
(lambda _
- ;; Cython extensions have to be built before running the tests.
- (invoke "python" "setup.py" "build_ext" "--inplace"))))))
- (propagated-inputs
- (list python-astropy
- python-numpy
- python-pyparsing))
+ (for-each delete-file-recursively
+ (find-files #$output "__pycache__" #:directories?
#t)))))))
(native-inputs
(list python-cython
python-extension-helpers
python-pytest
python-pytest-astropy
- python-pytest-astropy-header
python-setuptools
- python-setuptools-scm
- python-wheel))
+ python-setuptools-scm))
+ (propagated-inputs
+ (list python-astropy
+ python-numpy
+ python-pyparsing))
(home-page "https://github.com/astropy/pyregion")
(synopsis "Python parser for ds9 region files")
(description