[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
13/47: gnu: python-astropy: Symplify package.
From: |
guix-commits |
Subject: |
13/47: gnu: python-astropy: Symplify package. |
Date: |
Tue, 30 Apr 2024 16:42:40 -0400 (EDT) |
sharlatan pushed a commit to branch master
in repository guix.
commit 6a6378c2eb6b1cb05594602a2284877f22e1af39
Author: Sharlatan Hellseher <sharlatanus@gmail.com>
AuthorDate: Wed Apr 3 22:09:02 2024 +0100
gnu: python-astropy: Symplify package.
* gnu/packages/astronomy.scm (python-astropy): Simplify package.
[build-system]: Swap to pyproject-build-system.
[arguments] <#:phases>: Merge 'prepare-test-environment into custom
'check phase and move test arguments to <#:test-arguments>.
Change-Id: I80098c3eb4e9d95ef2c651d5416196165be3f7c0
---
gnu/packages/astronomy.scm | 47 ++++++++++++++++++++++------------------------
1 file changed, 22 insertions(+), 25 deletions(-)
diff --git a/gnu/packages/astronomy.scm b/gnu/packages/astronomy.scm
index c5355e463c..466d1aaaf8 100644
--- a/gnu/packages/astronomy.scm
+++ b/gnu/packages/astronomy.scm
@@ -1565,9 +1565,20 @@ accurately in real time at any rate desired.")
;; see https://github.com/astropy/astropy/pull/14311
(with-directory-excursion "cextern"
(for-each delete-file-recursively '("expat" "wcslib")))))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
(list
+ #:test-flags
+ #~(list "--pyargs" "astropy"
+ "-n" "auto"
+ "-k" (string-append
+ ;; Skip tests that need remote data.
+ "not remote_data"
+ ;; E astropy.samp.errors.SAMPProxyError:
+ ;; <SAMPProxyError 1: 'Timeout expired!'>
+ " and not test_main"
+ ;; E ModuleNotFoundError: No module named 'wofz'
+ " and not test_pickle_functional"))
#:phases
#~(modify-phases %standard-phases
(add-after 'unpack 'preparations
@@ -1587,32 +1598,18 @@ accurately in real time at any rate desired.")
(add-before 'install 'writable-compiler
(lambda _
(make-file-writable "astropy/_compiler.c")))
- (add-before 'check 'prepare-test-environment
- (lambda _
- ;; Some tests require a writable home.
- (setenv "HOME" "/tmp")
- (make-file-writable "astropy/_compiler.c")
- ;; Extensions have to be rebuilt before running the tests.
- (invoke "python" "setup.py" "build_ext" "--inplace"
- "-j" (number->string (parallel-job-count)))))
- ;; TODO: The swap to pyproject-build-system introduced all tests
- ;; failed due to pytest could not load conftest.py, find out how
- ;; to resolve it and migrate completely to pyproject-build-system.
(replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
+ (lambda* (#:key tests? test-flags #:allow-other-keys)
(when tests?
- (invoke "python" "-m" "pytest" "--pyargs" "astropy"
- ;; with -n : 133.00s
- ;; without -n : 326.14s
- "-n" (number->string (parallel-job-count))
- "-k" (string-append
- ;; Skip tests that need remote data.
- "not remote_data"
- ;; E astropy.samp.errors.SAMPProxyError:
- ;; <SAMPProxyError 1: 'Timeout expired!'>
- " and not test_main"
- ;; E ModuleNotFoundError: No module named 'wofz'
- " and not test_pickle_functional"))))))))
+ (setenv "HOME" "/tmp")
+ (make-file-writable "astropy/_compiler.c")
+ ;; Extensions have to be rebuilt before running the tests.
+ (invoke "python" "setup.py" "build_ext" "--inplace"
+ "-j" (number->string (parallel-job-count)))
+ ;; 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))))))))
(native-inputs
(list pkg-config
python-colorlog
- branch master updated (a1ffa8a69b -> 147f1f2e0d), guix-commits, 2024/04/30
- 04/47: gnu: libxisf: Update to 0.2.12., guix-commits, 2024/04/30
- 01/47: gnu: cfitsio: Update to 4.4.0., guix-commits, 2024/04/30
- 03/47: gnu: indi-2.0: Update to 2.0.7., guix-commits, 2024/04/30
- 05/47: gnu: python-pytest-socket: Update to 0.7.0., guix-commits, 2024/04/30
- 06/47: gnu: parfive: Update to 2.1.0., guix-commits, 2024/04/30
- 09/47: gnu: Add python-supersmoother., guix-commits, 2024/04/30
- 11/47: gnu: python-asdf-astropy: Update to 0.6.1., guix-commits, 2024/04/30
- 13/47: gnu: python-astropy: Symplify package.,
guix-commits <=
- 15/47: gnu: python-astropy-healpix: Update to 1.0.3., guix-commits, 2024/04/30
- 17/47: gnu: python-stcal: Update to 1.7.0., guix-commits, 2024/04/30
- 10/47: gnu: python-asdf: Update to 3.2.0., guix-commits, 2024/04/30
- 12/47: gnu: python-astropy-iers-data: Update to 0.2024.4.15.2.45.49., guix-commits, 2024/04/30
- 14/47: gnu: python-astropy: Update to 6.0.1., guix-commits, 2024/04/30
- 02/47: gnu: stellarium: Update to 24.1., guix-commits, 2024/04/30
- 07/47: gnu: python-exif-read: Update to 3.0.0., guix-commits, 2024/04/30
- 08/47: gnu: Add python-pysiaf., guix-commits, 2024/04/30
- 19/47: gnu: python-stsci-imagestats: Update to 1.8.2., guix-commits, 2024/04/30
- 20/47: gnu: python-stsci-image: Refresh package style., guix-commits, 2024/04/30