lbraun pushed a commit to branch wip-python-pep517
in repository guix.
commit 32a0aec69f929079080fa50699d33af8d884f7c3
Author: Lars-Dominik Braun <[email protected]>
AuthorDate: Fri Jan 7 14:05:11 2022 +0100
gnu: python-typer: Add missing build input.
* gnu/packages/python-xyz.scm (python-typer)[native-inputs]: Add
python-flit-core.
[arguments]: Move test flags to #:test-flags and rename custom 'check to
'set-HOME.
---
gnu/packages/python-xyz.scm | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 6d80d05208..0eb5fb576f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21612,15 +21612,15 @@ based on the CPython 2.7 and 3.7 parsers.")
(version "0.3.2")
(source
(origin
- ;; Building `python-typer` from the git repository requires the
`flit-core`
- ;; Python package that is not installed by `python-flit`.
(method url-fetch)
(uri (pypi-uri "typer" version))
(sha256
(base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
(build-system python-build-system)
(arguments
- `(#:phases
+ `(#:test-flags `("-vv" "-k" ,(string-append "not test_show_completion "
+ "and not test_install_completion"))
+ #:phases
(modify-phases %standard-phases
;; Unfortunately, this doesn't seem to be enough to fix these two
;; tests, but we'll patch this anyway.
@@ -21629,7 +21629,7 @@ based on the CPython 2.7 and 3.7 parsers.")
(substitute* "tests/test_completion/test_completion.py"
(("\"bash\"") (string-append "\"" (which "bash") "\""))
(("\"/bin/bash\"") (string-append "\"" (which "bash") "\"")))))
- (replace 'check
+ (add-before 'check 'set-HOME
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(setenv "HOME" "/tmp") ; some tests need it
@@ -21639,18 +21639,11 @@ based on the CPython 2.7 and 3.7 parsers.")
(setenv "GUIX_PYTHONPATH"
(string-append (getcwd) ":"
- (getenv "GUIX_PYTHONPATH")))
- (let ((disabled-tests (list "test_show_completion"
- "test_install_completion")))
- (invoke "python" "-m" "pytest" "tests/"
- "-k"
- (string-append "not "
- (string-join disabled-tests
- " and not "))))))))))
+ (getenv "GUIX_PYTHONPATH")))))))))
(propagated-inputs
(list python-click))
(native-inputs
- (list python-coverage python-pytest python-shellingham))
+ (list python-coverage python-pytest python-shellingham python-flit-core))
(home-page "https://github.com/tiangolo/typer")
(synopsis
"Typer builds CLI based on Python type hints")