summary refs log tree commit diff
path: root/gnu
diff options
context:
space:
mode:
authorArtyom V. Poptsov <poptsov.artyom@gmail.com>2022-05-21 23:27:59 +0300
committerLudovic Courtès <ludo@gnu.org>2022-05-27 23:13:24 +0200
commit4f122abfe0732e40f9422cc90c6c067d2825cf0a (patch)
tree569131fee19c17217fb53eb6178b92fc8e517d56 /gnu
parent5ae78c523a0a07edc9b920976c7cbd4ee04bb5c4 (diff)
downloadguix-4f122abfe0732e40f9422cc90c6c067d2825cf0a.tar.gz
gnu: Add python-catalogue.
* gnu/packages/python-xyz.scm (python-catalogue): New variable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/packages/python-xyz.scm26
1 files changed, 26 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 1c783d2dcb..32bdd1b651 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31742,3 +31742,29 @@ when the object is garbage collected.")
      "Simple but high performance Cython hash table mapping pre-randomized keys
 to void* values.")
     (license license:expat)))
+
+(define-public python-catalogue
+  (package
+    (name "python-catalogue")
+    (version "2.0.7")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "catalogue" version))
+              (sha256
+               (base32
+                "0srdxiil2xys8q1gpc1nvzhvis3a33d8a7amk2i1rlpbg6p36pak"))))
+    (build-system python-build-system)
+    (native-inputs (list python-pytest))
+    (inputs (list python python-zipp python-typing-extensions python-mypy))
+    (home-page "https://github.com/explosion/catalogue")
+    (synopsis "Lightweight function registries for your library")
+    (description
+     "\"catalogue\" is a tiny, zero-dependencies library that
+makes it easy to add function (or object) registries to your code.  Function
+registries are helpful when you have objects that need to be both easily
+serializable and fully customizable.  Instead of passing a function into your
+object, you pass in an identifier name, which the object can use to lookup the
+function from the registry.  This makes the object easy to serialize, because the
+name is a simple string.  If you instead saved the function, you'd have to use
+Pickle for serialization, which has many drawbacks.")
+    (license license:expat)))