diff options
author | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2023-04-23 16:53:59 +0000 |
---|---|---|
committer | Li-Wen Hsu <lwhsu@FreeBSD.org> | 2023-04-23 16:53:59 +0000 |
commit | 0da1795726472eb2a540fb9b2f8cc295cf80dd29 (patch) | |
tree | faed0cf7cc5453d4e7b39e8b5f4e2a79cbd6d14a | |
parent | 8570700560a1d5f0f89410f3ecc1e0827647e8c3 (diff) | |
download | ports-0da1795726472eb2a540fb9b2f8cc295cf80dd29.tar.gz ports-0da1795726472eb2a540fb9b2f8cc295cf80dd29.zip |
Add devel/py-immutabledict: Immutable wrapper around dictionaries for Python3
This will be used for the new version of net-im/py-matrix-synapse
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/py-immutabledict/Makefile | 17 | ||||
-rw-r--r-- | devel/py-immutabledict/distinfo | 3 | ||||
-rw-r--r-- | devel/py-immutabledict/pkg-descr | 14 |
4 files changed, 35 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 00e994fbadc6..8e91bfcc9cc3 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -4731,6 +4731,7 @@ SUBDIR += py-identify SUBDIR += py-ijson SUBDIR += py-imgkit + SUBDIR += py-immutabledict SUBDIR += py-immutables SUBDIR += py-importlab SUBDIR += py-importlib-metadata diff --git a/devel/py-immutabledict/Makefile b/devel/py-immutabledict/Makefile new file mode 100644 index 000000000000..434d9c818991 --- /dev/null +++ b/devel/py-immutabledict/Makefile @@ -0,0 +1,17 @@ +PORTNAME= immutabledict +PORTVERSION= 2.2.4 +CATEGORIES= devel python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= lwhsu@FreeBSD.org +COMMENT= Immutable wrapper around dictionaries for Python3 +WWW= https://github.com/corenting/immutabledict + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= python +USE_PYTHON= autoplist concurrent pep517 + +.include <bsd.port.mk> diff --git a/devel/py-immutabledict/distinfo b/devel/py-immutabledict/distinfo new file mode 100644 index 000000000000..6e9568b86586 --- /dev/null +++ b/devel/py-immutabledict/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1682174771 +SHA256 (immutabledict-2.2.4.tar.gz) = 3bedc0741faaa2846f6edf5c29183f993da3abaff6a5961bb70a5659bb9e68ab +SIZE (immutabledict-2.2.4.tar.gz) = 4314 diff --git a/devel/py-immutabledict/pkg-descr b/devel/py-immutabledict/pkg-descr new file mode 100644 index 000000000000..917430a3c3e3 --- /dev/null +++ b/devel/py-immutabledict/pkg-descr @@ -0,0 +1,14 @@ +A fork of the original frozendict, an immutable wrapper around dictionaries. +This library is a pure Python, MIT-licensed alternative to the new LGPL-3.0 +licensed frozendict. + +It implements the complete mapping interface and can be used as a drop-in +replacement for dictionaries where immutability is desired. The immutabledict +constructor mimics dict, and all of the expected interfaces (iter, len, repr, +hash, getitem) are provided. Note that an immutabledict does not guarantee the +immutability of its values, so the utility of hash method is restricted by +usage. + +The only difference is that the copy() method of immutable takes variable +keyword arguments, which will be present as key/value pairs in the new, +immutable copy. |