all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
To: 55563@debbugs.gnu.org
Subject: [bug#55563] [PATCH] gnu: Add python-catalogue
Date: Sat, 21 May 2022 23:31:37 +0300	[thread overview]
Message-ID: <87y1yufx06.fsf@gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 212 bytes --]

Hello,

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

- Artyom

References:
1. "Super lightweight function registries for your library"
   https://pypi.org/project/catalogue/

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: 0001-gnu-Add-python-catalogue.patch --]
[-- Type: text/x-diff, Size: 2058 bytes --]

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(+)

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


[-- Attachment #1.3: Type: text/plain, Size: 207 bytes --]


-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

             reply	other threads:[~2022-05-21 20:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-21 20:31 Artyom V. Poptsov [this message]
2022-05-27 21:14 ` bug#55563: [PATCH] gnu: Add python-catalogue Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y1yufx06.fsf@gmail.com \
    --to=poptsov.artyom@gmail.com \
    --cc=55563@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.