[PATCH] gnu: Add python-typer.

  • Done
  • quality assurance status badge
Details
2 participants
  • Ludovic Courtès
  • Tanguy Le Carrour
Owner
unassigned
Submitted by
Tanguy Le Carrour
Severity
normal
T
T
Tanguy Le Carrour wrote on 17 Jan 2021 14:45
(address . guix-patches@gnu.org)(name . Tanguy Le Carrour)(address . tanguy@bioneland.org)
20210117134551.2574-1-tanguy@bioneland.org
* gnu/packages/python-xyz.scm (python-typer): New variable.
---
gnu/packages/python-xyz.scm | 55 +++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)

Toggle diff (68 lines)
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
L
L
Ludovic Courtès wrote on 29 Jan 2021 12:08
(name . Tanguy Le Carrour)(address . tanguy@bioneland.org)(address . 45935-done@debbugs.gnu.org)
87eei4huf1.fsf@gnu.org
Tanguy Le Carrour <tanguy@bioneland.org> skribis:

Toggle quote (2 lines)
> * gnu/packages/python-xyz.scm (python-typer): New variable.

Applied, thanks!

Ludo’.
Closed
T
T
Tanguy LE CARROUR wrote on 29 Jan 2021 13:35
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 45935-done@debbugs.gnu.org)
1611923710.im7h6f5615.astroid@rafflesia.none
Hi Ludo'

Excerpts from Ludovic Courtès's message of January 29, 2021 12:08 pm:
Toggle quote (6 lines)
> Tanguy Le Carrour <tanguy@bioneland.org> skribis:
>
>> * gnu/packages/python-xyz.scm (python-typer): New variable.
>
> Applied, thanks!

Thanks!

--
Tanguy
Closed
?