diff mbox series

[bug#50505,01/12] gnu: Add python-cloup.

Message ID 87zgsiucuj.fsf@yoctocell.xyz
State New
Headers show
Series [bug#50505,01/12] gnu: Add python-cloup. | expand

Commit Message

Xinglu Chen Sept. 11, 2021, 7:33 p.m. UTC
On Fri, Sep 10 2021, Daniel Meißner via Guix-patches via wrote:

> * gnu/packages/python-xyz.scm (python-cloup): New variable.
> ---
>  gnu/packages/python-science.scm |  1 +
>  gnu/packages/python-xyz.scm     | 31 +++++++++++++++++++++++++++++++
>  2 files changed, 32 insertions(+)
>
> diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
> index 738b504e3b..d3730fadcc 100644
> --- a/gnu/packages/python-science.scm
> +++ b/gnu/packages/python-science.scm
> @@ -14,6 +14,7 @@
>  ;;; Copyright © 2021 Roel Janssen <roel@gnu.org>
>  ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
>  ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
> +;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index e98eec19bc..6c7ab10216 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -3308,6 +3308,37 @@ with sensible defaults out of the box.")
>          (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
>      (arguments `())))
>  
> +(define-public python-cloup
> +  (package
> +    (name "python-cloup")
> +    (version "0.11.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "cloup" version))
> +       (sha256
> +        (base32
> +         "07kxw81bml137w9bfmwkjbdzbldkk1k1lws82wffz9244pp7k8ib"))))
> +    (build-system python-build-system)
> +    (arguments
> +     '(#:phases (modify-phases %standard-phases
> +                  ;; test phase fails with "error: invalid command pytest"
> +                  (delete 'check))))

The tests run after applying the attached patch.  I also took the
liberty of fixing the formatting of the synopsis and description.  :-)

> +    (propagated-inputs
> +     `(("python-click" ,python-click)))
> +    (native-inputs
> +     `(("python-setuptools" ,python-setuptools)
> +       ("python-setuptools-scm" ,python-setuptools-scm/next)
> +       ("python-pytest" ,python-pytest)))
> +    (home-page "https://github.com/janLuke/cloup")
> +    (synopsis "Extension library for python-click")
> +    (description
> +     "Cloup — originally from \"Click + option groups\" — enriches Click with
> +several features that make it more expressive and configurable: option groups,
> +constraints, subcommand aliases, subcommands sections and a themeable
> +HelpFormatter.")
> +    (license license:bsd-3)))
> +
>  (define-public python-vcversioner
>    (package
>      (name "python-vcversioner")
> -- 
> 2.33.0

Comments

Daniel Meißner Sept. 15, 2021, 2:54 p.m. UTC | #1
Hi Xinglu,

thanks for your thorough review and the fix :)  I will prepare a new
patchset implementing the comments.

Best
Daniel
diff mbox series

Patch

From 574d6706ee0472b2e5e10a42af9bf9ded017a3f1 Mon Sep 17 00:00:00 2001
Message-Id: <574d6706ee0472b2e5e10a42af9bf9ded017a3f1.1631388580.git.public@yoctocell.xyz>
From: =?UTF-8?q?Daniel=20Mei=C3=9Fner=20via=20Guix-patches=20via?=
 <guix-patches@gnu.org>
Date: Fri, 10 Sep 2021 13:24:51 +0200
Subject: [PATCH] gnu: Add python-cloup.

* gnu/packages/python-xyz.scm (python-cloup): New variable.

Co-authored-by: Xinglu Chen <public@yoctocell.xyz>
---
 gnu/packages/python-science.scm |  1 +
 gnu/packages/python-xyz.scm     | 35 +++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 738b504e3b..d3730fadcc 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -14,6 +14,7 @@ 
 ;;; Copyright © 2021 Roel Janssen <roel@gnu.org>
 ;;; Copyright © 2021 Paul Garlick <pgarlick@tourbillion-technology.com>
 ;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2021 Daniel Meißner <daniel.meissner-i4k@ruhr-uni-bochum.de>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 7c70829de9..2db7ccc0ee 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -3307,6 +3307,41 @@  with sensible defaults out of the box.")
         (base32 "0njsm0wn31l21bi118g5825ma5sa3rwn7v2x4wjd7yiiahkri337"))))
     (arguments `())))
 
+(define-public python-cloup
+  (package
+    (name "python-cloup")
+    (version "0.11.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "cloup" version))
+       (sha256
+        (base32
+         "07kxw81bml137w9bfmwkjbdzbldkk1k1lws82wffz9244pp7k8ib"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest")))))))
+    (propagated-inputs
+     `(("python-click" ,python-click)))
+    (native-inputs
+     `(("python-setuptools" ,python-setuptools)
+       ("python-setuptools-scm" ,python-setuptools-scm/next)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://github.com/janLuke/cloup")
+    (synopsis "Extension library for @code{python-click}")
+    (description
+     "Cloup---originally from ``Click + option groups''---enriches
+@code{python-click} with several features that make it more expressive and
+configurable: option groups, constraints, subcommand aliases, subcommands
+sections, and a themeable @code{HelpFormatter}.")
+    (license license:bsd-3)))
+
 (define-public python-vcversioner
   (package
     (name "python-vcversioner")
-- 
2.33.0