guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: gnu: python-typer: Update to 0.6.1.


From: guix-commits
Subject: 01/02: gnu: python-typer: Update to 0.6.1.
Date: Fri, 12 Aug 2022 04:37:51 -0400 (EDT)

mothacehe pushed a commit to branch master
in repository guix.

commit 3ceb985e756ac9fcf0633fb556c8905df7602e7d
Author: Tanguy Le Carrour <tanguy@bioneland.org>
AuthorDate: Wed Aug 10 10:12:53 2022 +0200

    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.
    
    Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
---
 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 3f87eabcb3..d7f8902bff 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21513,15 +21513,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
@@ -21533,6 +21534,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?
@@ -21554,7 +21567,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")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]