GNU bug report logs - #57101
[PATCH] gnu: python-typer: Update to 0.6.1.

Previous Next

Package: guix-patches;

Reported by: Tanguy Le Carrour <tanguy <at> bioneland.org>

Date: Wed, 10 Aug 2022 08:14:02 UTC

Severity: normal

Tags: patch

Done: Mathieu Othacehe <othacehe <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mathieu Othacehe <othacehe <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#57101: closed ([PATCH] gnu: python-typer: Update to 0.6.1.)
Date: Fri, 12 Aug 2022 08:39:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Fri, 12 Aug 2022 10:38:21 +0200
with message-id <878rnt26wy.fsf <at> gnu.org>
and subject line Re: bug#57101: [PATCH] gnu: python-typer: Update to 0.6.1.
has caused the debbugs.gnu.org bug report #57101,
regarding [PATCH] gnu: python-typer: Update to 0.6.1.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
57101: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=57101
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Tanguy Le Carrour <tanguy <at> bioneland.org>
To: guix-patches <at> gnu.org
Cc: Tanguy Le Carrour <tanguy <at> bioneland.org>
Subject: [PATCH] gnu: python-typer: Update to 0.6.1.
Date: Wed, 10 Aug 2022 10:12:53 +0200
* 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(-)

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



[Message part 3 (message/rfc822, inline)]
From: Mathieu Othacehe <othacehe <at> gnu.org>
To: Tanguy Le Carrour <tanguy <at> bioneland.org>
Cc: 57101-done <at> debbugs.gnu.org
Subject: Re: bug#57101: [PATCH] gnu: python-typer: Update to 0.6.1.
Date: Fri, 12 Aug 2022 10:38:21 +0200
> * 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


This bug report was last modified 3 years and 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.