diff options
author | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-04-03 16:35:17 +0100 |
---|---|---|
committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2024-04-30 21:36:11 +0100 |
commit | 9a5cbde29c768227b966f3ac21b4a907e167de65 (patch) | |
tree | 636e475754ee711ea60a345f6df27634bc7f1c65 /gnu/packages/astronomy.scm | |
parent | e7e929094d6ce9df96c92df362157915b3b15141 (diff) | |
download | guix-9a5cbde29c768227b966f3ac21b4a907e167de65.tar.gz guix-9a5cbde29c768227b966f3ac21b4a907e167de65.zip |
gnu: python-synphot: Add custom check phase.
* gnu/packages/astronomy.scm (python-synphot): [arguments] <#:phases>:
Remove 'prepare-test-environment phase; add custom 'check phase.
Change-Id: I9cb6d65c226a555ccd62a3a6c08d00868a66f109
Diffstat (limited to 'gnu/packages/astronomy.scm')
-rw-r--r-- | gnu/packages/astronomy.scm | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm index ca30ff60a0..0df5dc84e4 100644 --- a/gnu/packages/astronomy.scm +++ b/gnu/packages/astronomy.scm @@ -4348,19 +4348,14 @@ object.") (list #:phases #~(modify-phases %standard-phases - (add-before 'check 'prepare-test-environment - (lambda _ - (invoke "python" "setup.py" "build_ext" "--inplace") - ;; 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")))))))) + (replace 'check + (lambda* (#:key tests? test-flags #:allow-other-keys) + (when tests? + (invoke "python" "setup.py" "build_ext" "--inplace") + ;; Step out of the source directory to avoid interference; we + ;; want to run the installed code with extensions etc. + (with-directory-excursion "/tmp" + (apply invoke "pytest" "-v" test-flags)))))))) (propagated-inputs (list python-astropy python-dust-extinction |