git: 272b6fb8f52b - main - devel/py-cattrs: Add py-cattrs 1.10.0
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 28 Feb 2022 12:50:42 UTC
The branch main has been updated by sunpoet:
URL: https://cgit.FreeBSD.org/ports/commit/?id=272b6fb8f52bc0bba505c034f5f545259efccfcd
commit 272b6fb8f52bc0bba505c034f5f545259efccfcd
Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-02-28 09:54:41 +0000
Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-02-28 12:45:54 +0000
devel/py-cattrs: Add py-cattrs 1.10.0
cattrs is an open source Python library for structuring and unstructuring data.
cattrs works best with attrs classes, dataclasses and the usual Python
collections, but other kinds of classes are supported by manually registering
converters.
Python has a rich set of powerful, easy to use, built-in data types like
dictionaries, lists and tuples. These data types are also the lingua franca of
most data serialization libraries, for formats like json, msgpack, yaml or toml.
Data types like this, and mappings like dict s in particular, represent
unstructured data. Your data is, in all likelihood, structured: not all
combinations of field names or values are valid inputs to your programs. In
Python, structured data is better represented with classes and enumerations.
attrs is an excellent library for declaratively describing the structure of your
data, and validating it.
When you're handed unstructured data (by your network, file system,
database...), cattrs helps to convert this data into structured data. When you
have to convert your structured data into data types other libraries can handle,
cattrs turns your classes and enumerations into dictionaries, integers and
strings.
WWW: https://github.com/python-attrs/cattrs
---
devel/Makefile | 1 +
devel/py-cattrs/Makefile | 28 ++++++++++++++++++++++++++++
devel/py-cattrs/distinfo | 3 +++
devel/py-cattrs/pkg-descr | 23 +++++++++++++++++++++++
4 files changed, 55 insertions(+)
diff --git a/devel/Makefile b/devel/Makefile
index e55d0fb13dab..028ad4ffcdae 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4342,6 +4342,7 @@
SUBDIR += py-case
SUBDIR += py-castellan
SUBDIR += py-catalogue
+ SUBDIR += py-cattrs
SUBDIR += py-cbor
SUBDIR += py-cbor2
SUBDIR += py-cclib
diff --git a/devel/py-cattrs/Makefile b/devel/py-cattrs/Makefile
new file mode 100644
index 000000000000..4b38ffc00a15
--- /dev/null
+++ b/devel/py-cattrs/Makefile
@@ -0,0 +1,28 @@
+# Created by: Po-Chuan Hsieh <sunpoet@FreeBSD.org>
+
+PORTNAME= cattrs
+PORTVERSION= 1.10.0
+CATEGORIES= devel python
+MASTER_SITES= CHEESESHOP
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Composable complex class support for attrs and dataclasses
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}attrs>=20:devel/py-attrs@${PY_FLAVOR}
+
+USES= python:3.7+
+USE_PYTHON= autoplist concurrent distutils
+
+NO_ARCH= yes
+
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_REL} < 30800
+RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/py-cattrs/distinfo b/devel/py-cattrs/distinfo
new file mode 100644
index 000000000000..ca739ed89ad2
--- /dev/null
+++ b/devel/py-cattrs/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1643970966
+SHA256 (cattrs-1.10.0.tar.gz) = 211800f725cdecedcbcf4c753bbd22d248312b37d130f06045434acb7d9b34e1
+SIZE (cattrs-1.10.0.tar.gz) = 24893
diff --git a/devel/py-cattrs/pkg-descr b/devel/py-cattrs/pkg-descr
new file mode 100644
index 000000000000..d951efcfb542
--- /dev/null
+++ b/devel/py-cattrs/pkg-descr
@@ -0,0 +1,23 @@
+cattrs is an open source Python library for structuring and unstructuring data.
+cattrs works best with attrs classes, dataclasses and the usual Python
+collections, but other kinds of classes are supported by manually registering
+converters.
+
+Python has a rich set of powerful, easy to use, built-in data types like
+dictionaries, lists and tuples. These data types are also the lingua franca of
+most data serialization libraries, for formats like json, msgpack, yaml or toml.
+
+Data types like this, and mappings like dict s in particular, represent
+unstructured data. Your data is, in all likelihood, structured: not all
+combinations of field names or values are valid inputs to your programs. In
+Python, structured data is better represented with classes and enumerations.
+attrs is an excellent library for declaratively describing the structure of your
+data, and validating it.
+
+When you're handed unstructured data (by your network, file system,
+database...), cattrs helps to convert this data into structured data. When you
+have to convert your structured data into data types other libraries can handle,
+cattrs turns your classes and enumerations into dictionaries, integers and
+strings.
+
+WWW: https://github.com/python-attrs/cattrs