[PATCH] gnu: Add python-catalogue

DoneSubmitted by Artyom V. Poptsov.
Details
2 participants
  • Ludovic Courtès
  • Artyom V. Poptsov
Owner
unassigned
Severity
normal
A
A
Artyom V. Poptsov wrote on 21 May 22:31 +0200
(address . guix-patches@gnu.org)
87y1yufx06.fsf@gmail.com
Hello,

this patch adds a Python module "catalogue"[1] under the name
"python-catalogue".

- Artyom

References:
1. "Super lightweight function registries for your library"
From b45d368c1644497eca3f65daaec219421d48c9eb Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Sat, 21 May 2022 23:27:59 +0300
Subject: [PATCH] gnu: Add python-catalogue

* gnu/packages/python-xyz.scm (python-catalogue): New variable.
---
gnu/packages/python-xyz.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 3c4fa16d16..a56b5ef255 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -31449,3 +31449,29 @@ written in C.")
     (synopsis "Cython bindings for MurmurHash2")
     (description "This package provides Cython bindings for MurmurHash2.")
     (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)))
-- 
2.25.1
--
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE B57C E9C5 A2D9 0898 A02F
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEE0MLqwTMQgi2Y3rV86cWi2QiYoC8FAmKJTCkACgkQ6cWi2QiY
oC91vAf/TTc1DakeW8vt/+pH58maQJC59YO7NsdAYq08PCTTTbvSCh22Qax9pZae
1dkNmIS6vpCj6Ws3P6MIHtz9T8eeIuXSX2S4z1CuHhDlaslLFeacu9HOkWXJ4myT
+q4rFmpTMl7gFmyKkX0/UiXHG1ofjAwNCTh5sbuN47wUUEp7+hc9alaKI2AxJmFF
68MI67SuR5Wa08lYjKbPZ38x27E7Cv4dfLS1Lh8NGQgvN+2fEb/mGbGU1QhPPFqC
+nsjj99aZrdTrTo6wm42JSA1B23fgKE602iibVHENejN76/a5C39G639t3ksSTiw
9MmL62ng2bs9ZZqJeynIpmmahd3biw==
=1ePV
-----END PGP SIGNATURE-----

L
L
Ludovic Courtès wrote on 27 May 23:14 +0200
(name . Artyom V. Poptsov)(address . poptsov.artyom@gmail.com)(address . 55563-done@debbugs.gnu.org)
87y1ymd6ez.fsf@gnu.org
Hi,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> skribis:

Toggle quote (7 lines)
> From b45d368c1644497eca3f65daaec219421d48c9eb Mon Sep 17 00:00:00 2001
> From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
> Date: Sat, 21 May 2022 23:27:59 +0300
> Subject: [PATCH] gnu: Add python-catalogue
>
> * gnu/packages/python-xyz.scm (python-catalogue): New variable.

Applied, thanks!

Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send email to 55563@debbugs.gnu.org