[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
24/27: gnu: python-astroquery: Improve package style.
From: |
guix-commits |
Subject: |
24/27: gnu: python-astroquery: Improve package style. |
Date: |
Sat, 18 Nov 2023 20:57:49 -0500 (EST) |
bavier pushed a commit to branch master
in repository guix.
commit 7a4c272619e1c0de9ab7aa76ddd59829087c391a
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Fri Nov 17 12:16:09 2023 +0000
gnu: python-astroquery: Improve package style.
* 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
Signed-off-by: Eric Bavier <bavier@posteo.net>
---
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 @@ astronomy and astrophysics.")
(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 @@ astronomy and astrophysics.")
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.")
- 14/27: gnu: python-jplephem: Update to 2.20., (continued)
- 14/27: gnu: python-jplephem: Update to 2.20., guix-commits, 2023/11/18
- 15/27: gnu: python-pynbody: Update to 1.4.2., guix-commits, 2023/11/18
- 11/27: gnu: python-casa-formats-io: Update to 0.2.2., guix-commits, 2023/11/18
- 16/27: gnu: python-pynbody: Prepare for cross compilation., guix-commits, 2023/11/18
- 17/27: gnu: python-rad: Update to 0.18.0., guix-commits, 2023/11/18
- 18/27: gnu: python-roman-datamodels: Update to 0.18.0., guix-commits, 2023/11/18
- 19/27: gnu: python-sgp4: Update to 2.23., guix-commits, 2023/11/18
- 20/27: gnu: python-wiimatch: Update to 0.3.2., guix-commits, 2023/11/18
- 21/27: gnu: splash: Update to 3.9.0., guix-commits, 2023/11/18
- 23/27: gnu: python-stsci-imagestats: Swap to pyproject-build-system., guix-commits, 2023/11/18
- 24/27: gnu: python-astroquery: Improve package style.,
guix-commits <=
- 25/27: gnu: python-poliastro: Improve package style., guix-commits, 2023/11/18
- 10/27: gnu: python-astroalign: Update to 2.5.1., guix-commits, 2023/11/18
- 12/27: gnu: python-crds: Update to 11.17.9., guix-commits, 2023/11/18
- 22/27: gnu: python-drms: Simplify package., guix-commits, 2023/11/18
- 02/27: gnu: qd: Update to 2.3.24., guix-commits, 2023/11/18
- 26/27: gnu: python-synphot: Enable tests., guix-commits, 2023/11/18
- 27/27: gnu: python-stsci-stimage: Enable tests., guix-commits, 2023/11/18