[PATCH] gnu: python-typer: Update to 0.6.1.

  • Done
  • quality assurance status badge
Details
2 participants
  • Mathieu Othacehe
  • Tanguy Le Carrour
Owner
unassigned
Submitted by
Tanguy Le Carrour
Severity
normal
T
T
Tanguy Le Carrour wrote on 10 Aug 2022 10:12
(address . guix-patches@gnu.org)(name . Tanguy Le Carrour)(address . tanguy@bioneland.org)
20220810081253.7008-1-tanguy@bioneland.org
* 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.
---
gnu/packages/python-xyz.scm | 28 +++++++++++++++++++++-------
1 file changed, 21 insertions(+), 7 deletions(-)

Toggle diff (58 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d18959889e..196659417c 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21437,15 +21437,16 @@ (define-public python-typed-ast
(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
@@ -21457,6 +21458,18 @@ (define-public python-typer
(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?
@@ -21478,7 +21491,8 @@ (define-public python-typer
(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")
--
2.37.1
M
M
Mathieu Othacehe wrote on 12 Aug 2022 10:38
(name . Tanguy Le Carrour)(address . tanguy@bioneland.org)(address . 57101-done@debbugs.gnu.org)
878rnt26wy.fsf@gnu.org
Toggle quote (5 lines)
> * 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.

Pushed, thanks! I also introduced gexps as a follow-up.

Mathieu
Closed
T
T
Tanguy LE CARROUR wrote on 12 Aug 2022 11:09
(name . Mathieu Othacehe)(address . othacehe@gnu.org)(address . 57101-done@debbugs.gnu.org)
166029536729.25646.1340599475599972907@localhost
Hi Mathieu,


Quoting Mathieu Othacehe (2022-08-12 10:38:21)
Toggle quote (8 lines)
>
> > * 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.
>
> Pushed, thanks! I also introduced gexps as a follow-up.

Thanks!


--
Tanguy
Closed
?