gnu: python-extension-helpers: Enable tests.
* gnu/packages/python-xyz.scm (python-extension-helpers): Adjust indentation. [source]: Swap to git checkout which contains tests. [arguments]: <#:tests-flags>: Disable one failing tests. <#:phases>: Add 'set-version phase. Use custom 'check phase. [native-inputs]: Remove python-coverage. Add python-tomli. Change-Id: I8a04811e43bc0f1c2e0761aca87c4888a1444fc1master
parent
5e63cf0acc
commit
57622749ca
|
@ -5045,33 +5045,51 @@ and is not compatible with JSON.")
|
||||||
(license license:expat)))
|
(license license:expat)))
|
||||||
|
|
||||||
(define-public python-extension-helpers
|
(define-public python-extension-helpers
|
||||||
(package
|
(package
|
||||||
(name "python-extension-helpers")
|
(name "python-extension-helpers")
|
||||||
(version "1.1.1")
|
(version "1.1.1")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method git-fetch) ; no tests in the PyPI tarball
|
||||||
(uri (pypi-uri "extension-helpers" version))
|
(uri (git-reference
|
||||||
(sha256
|
(url "https://github.com/astropy/extension-helpers")
|
||||||
(base32 "001zd6gfs9yrwjny1fxzycxx0kcasshlyl6rh1kgzm13ll2d6pgr"))))
|
(commit (string-append "v" version))))
|
||||||
(build-system pyproject-build-system)
|
(file-name (git-file-name name version))
|
||||||
;; FIXME: pytest failed to load test suit, find out why.
|
(sha256
|
||||||
;; - _pytest.pathlib.ImportPathMismatchError: ('extension_helpers.conftes
|
(base32 "1lkhypg21ydx03z03dppbf05zff40dyl0kn6nichzfdfpqnr5055"))))
|
||||||
(arguments (list #:tests? #f))
|
(build-system pyproject-build-system)
|
||||||
(native-inputs
|
(arguments
|
||||||
(list python-coverage
|
(list
|
||||||
python-pytest
|
;; It tries to install it via pip: E ModuleNotFoundError: No module named
|
||||||
python-pytest-astropy
|
;; 'helpers_test_package_fd9cc3a9_11fa_4a1a_b80e_c5b043949604'
|
||||||
python-pytest-cov
|
#:test-flags #~(list "-k" "not test_only_pyproject[True]")
|
||||||
python-setuptools-scm))
|
#:phases
|
||||||
(home-page "https://extension-helpers.readthedocs.io")
|
#~(modify-phases %standard-phases
|
||||||
(synopsis "Astropy ecosystem utilities for building and installing packages")
|
;; LookupError: setuptools-scm was unable to detect version for
|
||||||
(description
|
;; /tmp/guix-build-python-extension-helpers-1.1.1.drv-0/source.
|
||||||
"The extension-helpers package includes convenience helpers to assist with
|
(add-before 'build 'set-version
|
||||||
|
(lambda _
|
||||||
|
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))
|
||||||
|
(replace 'check
|
||||||
|
(lambda* (#:key tests? test-flags #:allow-other-keys)
|
||||||
|
(when tests?
|
||||||
|
(setenv "HOME" "/tmp")
|
||||||
|
(with-directory-excursion "/tmp"
|
||||||
|
(apply invoke "pytest" "-v" test-flags))))))))
|
||||||
|
(native-inputs
|
||||||
|
(list python-pytest
|
||||||
|
python-pytest-astropy
|
||||||
|
python-pytest-cov
|
||||||
|
python-setuptools-scm
|
||||||
|
python-tomli))
|
||||||
|
(home-page "https://extension-helpers.readthedocs.io")
|
||||||
|
(synopsis "Astropy ecosystem utilities for building and installing packages")
|
||||||
|
(description
|
||||||
|
"The extension-helpers package includes convenience helpers to assist with
|
||||||
building Python packages with compiled C/Cython extensions. It is developed by
|
building Python packages with compiled C/Cython extensions. It is developed by
|
||||||
the Astropy project but is intended to be general and usable by any Python
|
the Astropy project but is intended to be general and usable by any Python
|
||||||
package.")
|
package.")
|
||||||
(license license:bsd-3)))
|
(license license:bsd-3)))
|
||||||
|
|
||||||
(define-public python-extras
|
(define-public python-extras
|
||||||
(package
|
(package
|
||||||
|
|
Reference in New Issue