guix_mirror_bot pushed a commit to branch python-team
in repository guix.
commit 1dd47ec7a5ca81609501f93b256840cbb7316b5e
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Mon Jul 28 17:21:32 2025 +0100
gnu: python-jplephem: Fix tests.
* gnu/packages/astronomy.scm (python-jplephem):
[source]: Switch to git-fetch providing test data files.
[phases]{check}: Rework tests steps to run them from the "ci"
directory containing test data.
[native-inputs]: Remove python-wheel.
Change-Id: Ic7a23668fde1149f62babfd5b43c51bc901b517b
---
gnu/packages/astronomy.scm | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index 745120b85c..14e0422a9d 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -6397,22 +6397,26 @@ instruments.")
(version "2.22")
(source
(origin
- (method url-fetch)
- (uri (pypi-uri "jplephem" version))
+ (method git-fetch) ;no tests data in the PyPI tarball
+ (uri (git-reference
+ (url "https://github.com/brandon-rhodes/python-jplephem")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32 "0b2rgb7pvwnl72pqjryf9c812mmdxr69fwiym7mnz05l2xrcr6hd"))))
+ (base32 "01hjs0j2pnjn3ijqq5lyhnprkypfhx88qbmfpiyj3drdxjaw725s"))))
(build-system pyproject-build-system)
(arguments
(list
#:phases
#~(modify-phases %standard-phases
+ ;; The test steps are taken from project's GitHub Actions workflow.
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
- (invoke "python" "-m" "unittest" "discover" "-s" "test")))))))
+ (with-directory-excursion "ci"
+ (invoke "python" "-m" "unittest" "test" "-v"))))))))
(native-inputs
- (list python-setuptools
- python-wheel))
+ (list python-setuptools))
(propagated-inputs
(list python-numpy))
(home-page "https://github.com/brandon-rhodes/python-jplephem")