diff mbox series

[bug#50836,1/5] gnu: Add python-multipledispatch.

Message ID 20210927022011.30839-1-rprior@protonmail.com
State Accepted
Headers show
Series Python logic programming packages | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Ryan Prior Sept. 27, 2021, 2:20 a.m. UTC
* gnu/packages/python-xyz.scm (python-multipledispatch): New variable.
---
 gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

--
2.33.0

Comments

M Sept. 27, 2021, 10:28 a.m. UTC | #1
Ryan Prior via Guix-patches via schreef op ma 27-09-2021 om 02:20 [+0000]:
> * gnu/packages/python-xyz.scm (python-multipledispatch): New variable.
> ---
>  gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index a34c444a87..c833c95b5a 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -26584,6 +26584,26 @@ objects in the combined source, and how they define or use each other.  The
>  graph can be output for rendering by GraphViz or yEd.")
>      (license license:gpl2)))
> 
> +(define-public python-multipledispatch
> +  (package
> +    (name "python-multipledispatch")
> +    (version "0.6.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "multipledispatch" version))
> +       (sha256
> +        (base32
> +         "1slblghfjg9fdi9zpd7gmrkvfbv20nrdgnrymcnbky8bzm8i9ax7"))))
> +    (build-system python-build-system)
> +    (propagated-inputs `(("six" ,python-six)))

The convention is to use the package name of the input package as input
label ("python-six" instead of "six" in this case).  This is important for
the "guix style" in <https://issues.guix.gnu.org/49169>, which, when it will
be in master, allows writing this package definition as

(define-public python-multipledispatch
  (package
    (name "python-multipledispatch")
    ...
    (propagated-inputs (list python-six))
    ...))

(The long-term goal appears to be to remove input labels completely.)

Greetings,
Maxime.
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index a34c444a87..c833c95b5a 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -26584,6 +26584,26 @@  objects in the combined source, and how they define or use each other.  The
 graph can be output for rendering by GraphViz or yEd.")
     (license license:gpl2)))

+(define-public python-multipledispatch
+  (package
+    (name "python-multipledispatch")
+    (version "0.6.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "multipledispatch" version))
+       (sha256
+        (base32
+         "1slblghfjg9fdi9zpd7gmrkvfbv20nrdgnrymcnbky8bzm8i9ax7"))))
+    (build-system python-build-system)
+    (propagated-inputs `(("six" ,python-six)))
+    (home-page
+     "http://github.com/mrocklin/multipledispatch/")
+    (synopsis "Multiple dispatch for Python based on pattern matching")
+    (description "This library provides an efficient mechanism for overloading
+function implementations based on the types of the arguments.")
+    (license license:bsd-3)))
+
 (define-public date2name
   (let ((commit "6c8f37277e8ec82aa50f90b8921422be30c4e798")
         (revision "1"))