[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#64201] [PATCH v2 03/22] gnu: python-photutils: Update package style
From: |
Sharlatan Hellseher |
Subject: |
[bug#64201] [PATCH v2 03/22] gnu: python-photutils: Update package style. |
Date: |
Thu, 27 Jul 2023 00:15:29 +0100 |
* gnu/packages/astronomy.scm (python-photutils): Update package style.
[build-system]: Swap to python-build-system.
[arguments]: Use G-expressions. Rename the phase before check
'writable-compiler to 'build-extensions to reflect it's purpose, add
new step in phase building extensions for testing.
[native-inputs]: Remove python-pytest-runner.
---
gnu/packages/astronomy.scm | 26 ++++++++++++++++----------
1 file changed, 16 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 26d4e9621d..15a52e0744 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1833,23 +1833,29 @@ (define-public python-photutils
(uri (pypi-uri "photutils" version))
(sha256
(base32 "1bq4ma402lpa5d6l85awlc23kasxf40nq8hgi3iyrilnfikan0jz"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- `(#:test-target "pytest"
- #:phases
- (modify-phases %standard-phases
- ;; This file is opened in both install and check phases.
- (add-before 'install 'writable-compiler
- (lambda _ (make-file-writable "photutils/_compiler.c")))
- (add-before 'check 'writable-compiler
- (lambda _ (make-file-writable "photutils/_compiler.c"))))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; This file is opened in both install and check phases.
+ (add-before 'install 'writable-compiler
+ (lambda _ (make-file-writable "photutils/_compiler.c")))
+ (add-before 'check 'build-extensions
+ (lambda _
+ ;; Cython extensions have to be built before running
+ ;; the tests. If it's not build it fails with error:
+ ;;
+ ;; ModuleNotFoundError: No module named
+ ;; 'photutils.geometry.circular_overlap'
+ (make-file-writable "photutils/_compiler.c")
+ (invoke "python" "setup.py" "build_ext" "--inplace"))))))
(propagated-inputs
(list python-astropy python-numpy))
(native-inputs
(list python-cython
python-extension-helpers
python-pytest-astropy
- python-pytest-runner
python-setuptools-scm))
(home-page "https://github.com/astropy/photutils")
(synopsis "Source detection and photometry")
--
2.40.1
- [bug#64201] [PATCH v2 00/22]: gnu: Astronmy June updates., Sharlatan Hellseher, 2023/07/26
- [bug#64201] [PATCH v2 02/22] gnu: sextractor: Use G-expressions., Sharlatan Hellseher, 2023/07/26
- [bug#64201] [PATCH v2 01/22] gnu: sextractor: Update to 2.28.0, fix build., Sharlatan Hellseher, 2023/07/26
- [bug#64201] [PATCH v2 03/22] gnu: python-photutils: Update package style.,
Sharlatan Hellseher <=
- [bug#64201] [PATCH v2 05/22] gnu: calcmysky: Update to 0.3.1., Sharlatan Hellseher, 2023/07/26
- [bug#64201] [PATCH v2 06/22] gnu: libxisf: Update to 0.2.8., Sharlatan Hellseher, 2023/07/26
- [bug#64201] [PATCH v2 10/22] gnu: python-cdflib: Update to 1.0.5., Sharlatan Hellseher, 2023/07/26
- [bug#64201] [PATCH v2 13/22] gnu: python-fitsio: Enable tests., Sharlatan Hellseher, 2023/07/26
- [bug#64201] [PATCH v2 11/22] gnu: python-drms: Update to 0.6.4., Sharlatan Hellseher, 2023/07/26
- [bug#64201] [PATCH v2 04/22] gnu: calceph: Update to 3.5.2., Sharlatan Hellseher, 2023/07/26
- [bug#64201] [PATCH v2 08/22] gnu: python-astropy: Update to 5.3.1., Sharlatan Hellseher, 2023/07/26
- [bug#64201] [PATCH v2 07/22] gnu: splash: Update to 3.8.2., Sharlatan Hellseher, 2023/07/26
- [bug#64201] [PATCH v2 09/22] gnu: python-ccdproc: Update to 2.4.1., Sharlatan Hellseher, 2023/07/26
- [bug#64201] [PATCH v2 18/22] gnu: python-stcal: Update to 1.4.2., Sharlatan Hellseher, 2023/07/26