[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#72219] [PATCH 16/34] gnu: python-extension-helpers: Enable tests.
From: |
Sharlatan Hellseher |
Subject: |
[bug#72219] [PATCH 16/34] gnu: python-extension-helpers: Enable tests. |
Date: |
Sat, 20 Jul 2024 23:40:39 +0100 |
* 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: I8a04811e43bc0f1c2e0761aca87c4888a1444fc1
---
gnu/packages/python-xyz.scm | 66 +++++++++++++++++++++++--------------
1 file changed, 42 insertions(+), 24 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 036bda6262..7ef8488bfc 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -5045,33 +5045,51 @@ (define-public python-exceptiongroup
(license license:expat)))
(define-public python-extension-helpers
-(package
- (name "python-extension-helpers")
- (version "1.1.1")
- (source
- (origin
- (method url-fetch)
- (uri (pypi-uri "extension-helpers" version))
- (sha256
- (base32 "001zd6gfs9yrwjny1fxzycxx0kcasshlyl6rh1kgzm13ll2d6pgr"))))
- (build-system pyproject-build-system)
- ;; FIXME: pytest failed to load test suit, find out why.
- ;; - _pytest.pathlib.ImportPathMismatchError: ('extension_helpers.conftes
- (arguments (list #:tests? #f))
- (native-inputs
- (list python-coverage
- python-pytest
- python-pytest-astropy
- python-pytest-cov
- python-setuptools-scm))
- (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
+ (package
+ (name "python-extension-helpers")
+ (version "1.1.1")
+ (source
+ (origin
+ (method git-fetch) ; no tests in the PyPI tarball
+ (uri (git-reference
+ (url "https://github.com/astropy/extension-helpers")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1lkhypg21ydx03z03dppbf05zff40dyl0kn6nichzfdfpqnr5055"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ ;; It tries to install it via pip: E ModuleNotFoundError: No module named
+ ;; 'helpers_test_package_fd9cc3a9_11fa_4a1a_b80e_c5b043949604'
+ #:test-flags #~(list "-k" "not test_only_pyproject[True]")
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; LookupError: setuptools-scm was unable to detect version for
+ ;; /tmp/guix-build-python-extension-helpers-1.1.1.drv-0/source.
+ (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
the Astropy project but is intended to be general and usable by any Python
package.")
- (license license:bsd-3)))
+ (license license:bsd-3)))
(define-public python-extras
(package
--
2.41.0
- [bug#72219] [PATCH 20/34] gnu: python-stpipe: Improve indentation., (continued)
- [bug#72219] [PATCH 20/34] gnu: python-stpipe: Improve indentation., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 18/34] gnu: python-pytest-openfiles: Simplify package., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 01/34] gnu: Add python-pluggy-next., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 21/34] gnu: python-stdatamodels: Update to 2.0.0., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 11/34] gnu: python-czml3: Update to 1.0.1., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 12/34] gnu: python-czml3: Adjust indentation., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 17/34] gnu: python-pytest-openfiles: Update to 0.6.0., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 19/34] gnu: python-stpipe: Update to 0.6.0., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 29/34] gnu: Add python-sbpy., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 23/34] gnu: python-tweakwcs: Update to 0.8.8., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 16/34] gnu: python-extension-helpers: Enable tests.,
Sharlatan Hellseher <=
- [bug#72219] [PATCH 34/34] gnu: Add python-sncosmo., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 31/34] gnu: Add python-mpl-scatter-density., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 26/34] gnu: Add python-poetry-dynamic-versioning., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 32/34] gnu: Add python-glue-core., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 09/34] gnu: python-astropy-iers-data: Update to 0.2024.7.15.0.31.42., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 13/34] gnu: python-jwst: Update to 1.15.1., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 30/34] gnu: Add python-echo., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 22/34] gnu: python-sunpy: Update to 5.1.5., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 24/34] gnu: python-fast-histogram: Adjust inputs., Sharlatan Hellseher, 2024/07/20
- [bug#72219] [PATCH 28/34] gnu: Add python-ads., Sharlatan Hellseher, 2024/07/20