diff mbox series

[bug#67184] gnu: Add python-multimethod.

Message ID 87edgs9bgs.fsf@troyfigiel.com
State New
Headers show
Series [bug#67184] gnu: Add python-multimethod. | expand

Commit Message

Troy Figiel Nov. 14, 2023, 11:11 p.m. UTC
* gnu/packages/python-xyz.scm (python-multimethod): New variable.

Change-Id: Idef59632bddbcb0689820790d618f78105ac929d
---
 gnu/packages/python-xyz.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

Comments

Troy Figiel Jan. 7, 2024, 7:43 p.m. UTC | #1
I noticed that the first few patches I sent to Guix, were sent without a
base-commit. I have rebased the patch that follows on master and given
it a base-commit.

Best wishes,

Troy
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index e521c1580d..a705ee7ca3 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -145,6 +145,7 @@ 
 ;;; Copyright © c4droid <c4droid@foxmail.com>
 ;;; Copyright © 2023 Janneke Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2023 Attila Lendvai <attila@lendvai.name>
+;;; Copyright © 2023 Troy Figiel <troy@troyfigiel.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -31271,6 +31272,30 @@  (define-public python-multipledispatch
 function implementations based on the types of the arguments.")
     (license license:bsd-3)))
 
+(define-public python-multimethod
+  (package
+    (name "python-multimethod")
+    (version "1.10")
+    (source
+     (origin
+       ;; No tests in the PyPI tarball.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/coady/multimethod")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "07xv92q7f4bkp6dzkqvcv0zxr11729qdak4s3ldmbhdwgsf44g5h"))))
+    (build-system pyproject-build-system)
+    (native-inputs (list python-pytest))
+    (home-page "https://github.com/coady/multimethod")
+    (synopsis "Python support for multiple argument dispatching")
+    (description
+     "This package provides a decorator for adding multiple argument
+dispatching to functions.  The decorator creates a multimethod object as
+needed and registers the function with its annotations.")
+    (license license:asl2.0)))
+
 (define-public python-logical-unification
   (package
     (name "python-logical-unification")