summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanguy Le Carrour <tanguy@bioneland.org>2021-01-17 14:45:51 +0100
committerLudovic Courtès <ludo@gnu.org>2021-01-29 12:09:37 +0100
commitcbbac837dc34c0b7541e48450525f34c25b3e6f6 (patch)
treee65c7a0ba23b4c783c3bcc7742c2a7a4ce137b76
parentbb91875bb76a426e745592efe91002a944ec7347 (diff)
downloadguix-patches-cbbac837dc34c0b7541e48450525f34c25b3e6f6.tar
guix-patches-cbbac837dc34c0b7541e48450525f34c25b3e6f6.tar.gz
gnu: Add python-typer.
* gnu/packages/python-xyz.scm (python-typer): New variable. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/packages/python-xyz.scm55
1 files changed, 55 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 2706a8c0cd..eb1a9c8b14 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -18182,6 +18182,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")