git: 0da179572647 - main - Add devel/py-immutabledict: Immutable wrapper around dictionaries for Python3
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 23 Apr 2023 16:54:55 UTC
The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/ports/commit/?id=0da1795726472eb2a540fb9b2f8cc295cf80dd29 commit 0da1795726472eb2a540fb9b2f8cc295cf80dd29 Author: Li-Wen Hsu <lwhsu@FreeBSD.org> AuthorDate: 2023-04-23 16:53:59 +0000 Commit: Li-Wen Hsu <lwhsu@FreeBSD.org> CommitDate: 2023-04-23 16:53:59 +0000 Add devel/py-immutabledict: Immutable wrapper around dictionaries for Python3 This will be used for the new version of net-im/py-matrix-synapse --- devel/Makefile | 1 + devel/py-immutabledict/Makefile | 17 +++++++++++++++++ devel/py-immutabledict/distinfo | 3 +++ devel/py-immutabledict/pkg-descr | 14 ++++++++++++++ 4 files changed, 35 insertions(+) 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.