apteryx pushed a commit to branch version-1.4.0
in repository guix.
commit d791f5bf709ed6c83bde24706ecbc2f35bd1e3c6
Author: Maxim Cournoyer <[email protected]>
AuthorDate: Mon Dec 20 14:23:42 2021 -0500
gnu: python-testpath: Update to 0.5.0 and enable tests.
* gnu/packages/check.scm (python-testpath): Update to 0.5.0.
[phases]{relax-requirements}: New phase
{build}: Build using pypa-build's 'build' command.
{check}: Override phase.
{install}: Adjust.
[native-inputs]: Remove python-flit. Add python-pypa-build and
python-pytest.
[home-page]: Update.
---
gnu/packages/check.scm | 53 +++++++++++++++++++++++++-------------------------
1 file changed, 26 insertions(+), 27 deletions(-)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 194bdf20ad..5dcf8958f1 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -79,6 +79,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module (guix git-download)
#:use-module (guix build-system cmake)
#:use-module (guix build-system glib-or-gtk)
@@ -1865,7 +1866,7 @@ C/C++, R, and more, and uploads it to the
@code{codecov.io} service.")
(define-public python-testpath
(package
(name "python-testpath")
- (version "0.4.4")
+ (version "0.5.0")
(source
(origin
(method git-fetch)
@@ -1875,35 +1876,33 @@ C/C++, R, and more, and uploads it to the
@code{codecov.io} service.")
(file-name (git-file-name name version))
(sha256
(base32
- "1fwv4d3p54xx1x942s104irr35lszvv6jnr4nn1scsfvc0m1qmbk"))))
+ "08r1c6bhvj8pcdvzkqv1950k36a6q3v81fd2p1yqdq3c07mcwgif"))))
(build-system python-build-system)
(arguments
- `(#:tests? #f ; this package does not even have a setup.py
- #:modules ((guix build python-build-system)
- (guix build utils)
- (srfi srfi-1))
- #:phases
- (modify-phases %standard-phases
- (replace 'build
- (lambda _
- ;; A ZIP archive should be generated, but it fails with "ZIP does
- ;; not support timestamps before 1980". Luckily,
- ;; SOURCE_DATE_EPOCH is respected, which we set to some time in
- ;; 1980.
- (setenv "SOURCE_DATE_EPOCH" "315532800")
- (invoke "flit" "build")))
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (let ((out (assoc-ref outputs "out")))
- (for-each (lambda (wheel)
- (format #true wheel)
- (invoke "python" "-m" "pip" "install"
- wheel (string-append "--prefix=" out)))
- (find-files "dist" "\\.whl$"))))))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'relax-requirements
+ (lambda _
+ (substitute* "pyproject.toml"
+ (("flit_core >=3.2.0,<3.3")
+ "flit_core >=3.2.0"))))
+ ;; XXX: PEP 517 manual build copied from python-isort.
+ (replace 'build
+ (lambda _
+ (invoke "python" "-m" "build" "--wheel" "--no-isolation" ".")))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest"))))
+ (replace 'install
+ (lambda _
+ (let ((whl (car (find-files "dist" "\\.whl$"))))
+ (invoke "pip" "--no-cache-dir" "--no-input"
+ "install" "--no-deps" "--prefix" #$output whl)))))))
(native-inputs
- (list python-flit))
- (home-page "https://github.com/takluyver/testpath")
+ (list python-pypa-build python-flit-core python-pytest))
+ (home-page "https://github.com/jupyter/testpath")
(synopsis "Test utilities for code working with files and commands")
(description
"Testpath is a collection of utilities for Python code working with files