From 9c63adfa4cc8880b2567d0e92b09fcd16da52f92 Mon Sep 17 00:00:00 2001 From: Sunpoet Po-Chuan Hsieh Date: Wed, 3 Feb 2021 19:45:53 +0000 Subject: [PATCH] Add py-catalogue 2.0.1 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. WWW: https://github.com/explosion/catalogue --- devel/Makefile | 1 + devel/py-catalogue/Makefile | 27 +++++++++++++++++++++++++++ devel/py-catalogue/distinfo | 3 +++ devel/py-catalogue/pkg-descr | 10 ++++++++++ 4 files changed, 41 insertions(+) create mode 100644 devel/py-catalogue/Makefile create mode 100644 devel/py-catalogue/distinfo create mode 100644 devel/py-catalogue/pkg-descr diff --git a/devel/Makefile b/devel/Makefile index 095b147ab095..fffb280f722f 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4226,6 +4226,7 @@ SUBDIR += py-case SUBDIR += py-castellan SUBDIR += py-castellan1 + SUBDIR += py-catalogue SUBDIR += py-cbor SUBDIR += py-cbor2 SUBDIR += py-cclib diff --git a/devel/py-catalogue/Makefile b/devel/py-catalogue/Makefile new file mode 100644 index 000000000000..411d7c66c84f --- /dev/null +++ b/devel/py-catalogue/Makefile @@ -0,0 +1,27 @@ +# Created by: Po-Chuan Hsieh +# $FreeBSD$ + +PORTNAME= catalogue +PORTVERSION= 2.0.1 +CATEGORIES= devel python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= sunpoet@FreeBSD.org +COMMENT= Super lightweight function registries for your library + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= python:3.6+ +USE_PYTHON= autoplist concurrent distutils + +NO_ARCH= yes + +.include + +.if ${PYTHON_REL} < 3800 +RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}importlib-metadata>=0.20:devel/py-importlib-metadata@${PY_FLAVOR} +.endif + +.include diff --git a/devel/py-catalogue/distinfo b/devel/py-catalogue/distinfo new file mode 100644 index 000000000000..765b74aa787b --- /dev/null +++ b/devel/py-catalogue/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1612296101 +SHA256 (catalogue-2.0.1.tar.gz) = 0d01077dbfca7aa53f3ef4adecccce636bce4f82e5b52237703ab2f56478e56e +SIZE (catalogue-2.0.1.tar.gz) = 13188 diff --git a/devel/py-catalogue/pkg-descr b/devel/py-catalogue/pkg-descr new file mode 100644 index 000000000000..33431de9dfb6 --- /dev/null +++ b/devel/py-catalogue/pkg-descr @@ -0,0 +1,10 @@ +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. + +WWW: https://github.com/explosion/catalogue