unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Tanguy Le Carrour <tanguy@bioneland.org>
To: 45935@debbugs.gnu.org
Cc: Tanguy Le Carrour <tanguy@bioneland.org>
Subject: [bug#45935] [PATCH] gnu: Add python-typer.
Date: Sun, 17 Jan 2021 14:45:51 +0100	[thread overview]
Message-ID: <20210117134551.2574-1-tanguy@bioneland.org> (raw)

* gnu/packages/python-xyz.scm (python-typer): New variable.
---
 gnu/packages/python-xyz.scm | 55 +++++++++++++++++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index d08e23936c..12052e7e86 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18172,6 +18172,61 @@ based on the CPython 2.7 and 3.7 parsers.")
                    license:asl2.0
                    license:expat))))    ;ast27/Parser/spark.py
 
+(define-public python-typer
+  (package
+    (name "python-typer")
+    (version "0.3.2")
+    (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))
+       (sha256
+        (base32 "00v3h63dq8yxahp9vg3yb9r27l2niwv8gv0dbds9dzrc298dfmal"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'disable-failing-tests
+           (lambda _
+             (substitute* "tests/test_completion/test_completion.py"
+               (("def test_show_completion")
+                "def _test_show_completion")
+               (("def test_install_completion")
+                "def _test_install_completion"))
+             (substitute* "tests/test_completion/test_completion_install.py"
+               (("def test_completion_install_bash")
+                "def _test_completion_install_bash")
+               (("def test_completion_install_zsh")
+                "def _test_completion_install_zsh")
+               (("def test_completion_install_fish")
+                "def _test_completion_install_fish")
+               (("def test_completion_install_powershell")
+                "def _test_completion_install_powershell"))
+             #t))
+         (replace 'check
+           (lambda _
+             (setenv "PYTHONPATH"
+                     (string-append (getcwd) ":"
+                                    (getenv "PYTHONPATH")))
+             (invoke "python" "-m" "pytest" "tests/")
+             #t)))))
+    (propagated-inputs
+     `(("python-click" ,python-click)))
+    (native-inputs
+     `(("python-coverage" ,python-coverage)
+       ("python-pytest" ,python-pytest)
+       ("python-shellingham" ,python-shellingham)))
+    (home-page "https://github.com/tiangolo/typer")
+    (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.")
+    ;; MIT license
+    (license license:expat)))
+
 (define-public python-typing
   (package
     (name "python-typing")
-- 
2.30.0





             reply	other threads:[~2021-01-17 13:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-17 13:45 Tanguy Le Carrour [this message]
2021-01-29 11:08 ` bug#45935: [PATCH] gnu: Add python-typer Ludovic Courtès
2021-01-29 12:35   ` [bug#45935] " Tanguy LE CARROUR

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210117134551.2574-1-tanguy@bioneland.org \
    --to=tanguy@bioneland.org \
    --cc=45935@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).