aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/python-xyz.scm74
1 files changed, 28 insertions, 46 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9629012a80..bb25c35caf 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -22311,60 +22311,42 @@ based on the CPython 2.7 and 3.7 parsers.")
(file-name (git-file-name name version))
(sha256
(base32 "1knv353qhkl2imav3jfp6bgq47m8wkkqhq1dzmqg2sv8rsy7zgl7"))))
- (build-system python-build-system)
+ (build-system pyproject-build-system)
(arguments
- `(#:phases
- ,#~(modify-phases %standard-phases
- ;; Unfortunately, this doesn't seem to be enough to fix these two
- ;; tests, but we'll patch this anyway.
- (add-after 'unpack 'patch-shell-reference
- (lambda _
- (substitute* "tests/test_completion/test_completion.py"
- (("\"bash\"") (string-append "\"" (which "bash") "\""))
- (("\"/bin/bash\"")
- (string-append "\"" (which "bash") "\"")))))
- (replace 'build
- (lambda _
- (invoke "flit" "build")))
- (replace 'install
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (for-each
- (lambda (wheel)
- (format #true wheel)
- (invoke "python" "-m" "pip" "install"
- wheel (string-append "--prefix=" #$output)))
- (find-files "dist" "\\.whl$"))))
- (replace 'check
- (lambda* (#:key tests? #:allow-other-keys)
- (when tests?
- (setenv "HOME" "/tmp") ; some tests need it
-
- ;; This is for completion tests
- (with-output-to-file "/tmp/.bashrc"
- (lambda _ (display "# dummy")))
-
- (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 "))))))))))
+ (list
+ #:test-flags
+ '(let ((disabled-tests (list "test_show_completion"
+ "test_install_completion")))
+ (list "-k" (string-append "not "
+ (string-join disabled-tests
+ " and not "))))
+ #:phases
+ #~(modify-phases %standard-phases
+ ;; Unfortunately, this doesn't seem to be enough to fix these two
+ ;; tests, but we'll patch this anyway.
+ (add-after 'unpack 'patch-shell-reference
+ (lambda _
+ (substitute* "tests/test_completion/test_completion.py"
+ (("\"bash\"") (string-append "\"" (which "bash") "\""))
+ (("\"/bin/bash\"")
+ (string-append "\"" (which "bash") "\"")))))
+ (add-before 'check 'pre-check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "HOME" "/tmp") ; some tests need it
+ ;; This is for completion tests
+ (with-output-to-file "/tmp/.bashrc"
+ (lambda _ (display "# dummy")))))))))
(propagated-inputs
(list python-click))
(native-inputs
(list python-coverage python-flit python-pytest python-rich
python-shellingham))
(home-page "https://github.com/tiangolo/typer")
- (synopsis
- "Typer builds CLI based on Python type hints")
+ (synopsis "Typer builds CLI based on Python type hints")
(description
- "Typer is a library for building CLI applications. It's based on
-Python 3.6+ type hints.")
+ "Typer is a library for building CLI applications. It's based on Python
+3.6+ type hints.")
;; MIT license
(license license:expat)))