gnu: python-pyerfa: Fix tests.

* gnu/packages/astronomy.scm (python-pyerfa): Fix tests.
[build-system]: Change to pyproject-build-system.
[arguments]: Disable a failing test. Add 'build-extensions phase.

Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
Sharlatan Hellseher 2023-07-27 00:15:41 +01:00 committed by Andreas Enge
parent bc7a8ebcd8
commit 296a157092
No known key found for this signature in database
GPG key ID: F7D5C9BF765C61E3

View file

@ -3255,13 +3255,19 @@ (define-public python-pyerfa
;; Remove bundled submodule library.
(delete-file-recursively "liberfa")
#t))))
(build-system python-build-system)
(build-system pyproject-build-system)
(arguments
`(#:phases
`(;; Disable only one failing test:
;; AttributeError: __warningregistry__
#:test-flags '("-k" "not test_errwarn_reporting")
#:phases
(modify-phases %standard-phases
(add-before 'build 'use-system-liberfa
(lambda _
(setenv "PYERFA_USE_SYSTEM_LIBERFA" "1"))))))
(setenv "PYERFA_USE_SYSTEM_LIBERFA" "1")))
(add-before 'check 'build-extensions
(lambda _
(invoke "python" "setup.py" "build_ext" "--inplace"))))))
(native-inputs
(list python-pytest-doctestplus python-pytest python-setuptools-scm))
(inputs