summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanguy Le Carrour <tanguy@bioneland.org>2022-08-10 10:12:53 +0200
committerGuix Patches Tester <>2022-08-10 09:14:47 +0100
commit4e74ca20ec33d3da0ccc17a01207ac9184c51600 (patch)
treeaeb0f589ca55a2e02f0d4d11e2ac7e3fbc074115
parent4b780d002d8eb79ac0de035c4a3861f1696f6430 (diff)
downloadguix-patches-4e74ca20ec33d3da0ccc17a01207ac9184c51600.tar
guix-patches-4e74ca20ec33d3da0ccc17a01207ac9184c51600.tar.gz
gnu: python-typer: Update to 0.6.1.
* gnu/packages/python-xyz.scm (python-typer): Update to 0.6.1. [source]: Use GIT-FETCH. [arguments]: Build from source with flit. [native-inputs]: Add python-flit and python-rich.
-rw-r--r--gnu/packages/python-xyz.scm28
1 files changed, 21 insertions, 7 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e5326274c0..d7a7ea9326 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21428,15 +21428,16 @@ based on the CPython 2.7 and 3.7 parsers.")
(define-public python-typer
(package
(name "python-typer")
- (version "0.3.2")
+ (version "0.6.1")
(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))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tiangolo/typer")
+ (commit version)))
+ (file-name (git-file-name name version))
(sha256
- (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
+ (base32 "1knv353qhkl2imav3jfp6bgq47m8wkkqhq1dzmqg2sv8rsy7zgl7"))))
(build-system python-build-system)
(arguments
`(#:phases
@@ -21448,6 +21449,18 @@ 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 'build
+ (lambda _
+ (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$")))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
@@ -21469,7 +21482,8 @@ based on the CPython 2.7 and 3.7 parsers.")
(propagated-inputs
(list python-click))
(native-inputs
- (list python-coverage python-pytest python-shellingham))
+ (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")