[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#67237] [PATCH 20/32] gnu: python-astroquery: Improve package style.
From: |
Sharlatan Hellseher |
Subject: |
[bug#67237] [PATCH 20/32] gnu: python-astroquery: Improve package style. |
Date: |
Fri, 17 Nov 2023 12:16:09 +0000 |
* gnu/packages/astronomy.scm (python-astroquery): Improve package style.
[build-system]: Swap to pyproject-build-system.
[arguments]{phases}: Rename 'writable-home phase to
'prepare-test-environment to reflect the purpose, Add extra step
configuring Pytest.
[native-inputs]: Remove python-flask, python-jinja2. Add
python-astropy-healpix, python-regions.
Change-Id: Id3909a13e451a2f9d5f4f28511e9f04c6bceb738
---
gnu/packages/astronomy.scm | 41 +++++++++++++++++++++++---------------
1 file changed, 25 insertions(+), 16 deletions(-)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index e9caced125..d12dccc208 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1614,19 +1614,27 @@ (define-public python-astroquery
(uri (pypi-uri "astroquery" version))
(sha256
(base32 "1vhkzsqlgn3ji5by2rdf2gwklhbyzvpzb1iglalhqjkkrdaaaz1h"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- (list #:phases
- #~(modify-phases %standard-phases
- (add-before 'check 'writable-home
- (lambda _ ; some tests need a writable home
- (setenv "HOME" (getcwd))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (invoke "python" "-m" "pytest" "--pyargs" "astroquery"
- ;; Skip tests that require online data.
- "-m" "not remote_data")))))))
+ (list
+ #:test-flags
+ #~(list "--pyargs" "astroquery"
+ "-m" "not remote_data")
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'check 'prepare-test-environment
+ (lambda _
+ (setenv "HOME" (getcwd)) ; some tests need a writable home
+ ;; To solve pytest/conftest issue. Pytest tries to load all
+ ;; files with word 'test' in them.
+ ;;
+ ;; ImportError while loading conftest ...
+ ;; _pytest.pathlib.ImportPathMismatchError: ...
+ ;;
+ (call-with-output-file "pytest.ini"
+ (lambda (port)
+ (format port "[pytest]
+python_files = test_*.py"))))))))
(propagated-inputs
(list python-astropy
python-beautifulsoup4
@@ -1636,12 +1644,13 @@ (define-public python-astroquery
python-pyvo
python-requests))
(native-inputs
- (list python-flask
- python-jinja2
+ (list python-astropy-healpix
python-matplotlib
+ ;; python-mocpy : Not packed yet, optional
python-pytest-astropy
- python-pytest-dependency))
- (home-page "https://www.astropy.org/astroquery/")
+ python-pytest-dependency
+ python-regions))
+ (home-page "https://astroquery.readthedocs.io/en/latest/index.html")
(synopsis "Access online astronomical data resources")
(description "Astroquery is a package that contains a collection of tools
to access online Astronomical data. Each web service has its own
sub-package.")
--
2.41.0
- [bug#67237] [PATCH 05/32] gnu: python-astroalign: Update to 2.5.1., (continued)
- [bug#67237] [PATCH 05/32] gnu: python-astroalign: Update to 2.5.1., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 16/32] gnu: python-wiimatch: Update to 0.3.2., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 15/32] gnu: python-sgp4: Update to 2.23., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 03/32] gnu: libpasastro: Update to 1.4.1., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 11/32] gnu: python-pynbody: Update to 1.4.2., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 19/32] gnu: python-stsci-imagestats: Swap to pyproject-build-system., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 12/32] gnu: python-pynbody: Prepare for cross compilation., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 18/32] gnu: python-drms: Simplify package., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 10/32] gnu: python-posix-ipc: Update to 1.1.1., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 17/32] gnu: splash: Update to 3.9.0., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 20/32] gnu: python-astroquery: Improve package style.,
Sharlatan Hellseher <=
- [bug#67237] [PATCH 23/32] gnu: python-extension-helpers: Update to 1.1.0., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 26/32] gnu: parfive: Improve package style., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 29/32] gnu: python-memory-profiler: Enable all tests., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 21/32] gnu: python-extension-helpers: Enable tests., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 09/32] gnu: python-jplephem: Update to 2.20., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 01/32] gnu: celestia: Update to 1.6.4., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 32/32] gnu: python-posix-ipc: Limit tests to target-x86., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 08/32] gnu: python-fitsio: Update to 1.2.1., Sharlatan Hellseher, 2023/11/17
- [bug#67237] [PATCH 24/32] gnu: python-poliastro: Improve package style., Sharlatan Hellseher, 2023/11/17