git: dabbe8449f5f - main - devel/py-cattrs23: Add py-cattrs23 23.2.3 (copied from py-cattrs)

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Mon, 14 Oct 2024 05:27:07 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=dabbe8449f5fbd9a94b7a73cbcf9b15cb3aaacb6

commit dabbe8449f5fbd9a94b7a73cbcf9b15cb3aaacb6
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2024-10-14 04:45:07 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2024-10-14 04:45:07 +0000

    devel/py-cattrs23: Add py-cattrs23 23.2.3 (copied from py-cattrs)
    
    - Add PORTSCOUT
---
 devel/Makefile              |  1 +
 devel/py-cattrs23/Makefile  | 34 ++++++++++++++++++++++++++++++++++
 devel/py-cattrs23/distinfo  |  3 +++
 devel/py-cattrs23/pkg-descr | 21 +++++++++++++++++++++
 4 files changed, 59 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index f3d0d9649fbc..50615c8cb62f 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4593,6 +4593,7 @@
     SUBDIR += py-castellan
     SUBDIR += py-catalogue
     SUBDIR += py-cattrs
+    SUBDIR += py-cattrs23
     SUBDIR += py-cbor
     SUBDIR += py-cbor2
     SUBDIR += py-cclib
diff --git a/devel/py-cattrs23/Makefile b/devel/py-cattrs23/Makefile
new file mode 100644
index 000000000000..18677f1543e1
--- /dev/null
+++ b/devel/py-cattrs23/Makefile
@@ -0,0 +1,34 @@
+PORTNAME=	cattrs
+PORTVERSION=	23.2.3
+CATEGORIES=	devel python
+MASTER_SITES=	PYPI
+PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}
+PKGNAMESUFFIX=	23
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Composable complex class support for attrs and dataclasses
+WWW=		https://catt.rs/en/stable/ \
+		https://github.com/python-attrs/cattrs
+
+LICENSE=	MIT
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}hatch-vcs>=0:devel/py-hatch-vcs@${PY_FLAVOR} \
+		${PYTHON_PKGNAMEPREFIX}hatchling>=0:devel/py-hatchling@${PY_FLAVOR}
+RUN_DEPENDS=	${PYTHON_PKGNAMEPREFIX}attrs>=23.1.0:devel/py-attrs@${PY_FLAVOR} \
+		${PY_EXCEPTIONGROUP}
+
+USES=		python
+USE_PYTHON=	autoplist concurrent pep517
+
+NO_ARCH=	yes
+
+PORTSCOUT=	limit:^23\.
+
+.include <bsd.port.pre.mk>
+
+.if ${PYTHON_REL} < 31100
+RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}typing-extensions>=4.1.0:devel/py-typing-extensions@${PY_FLAVOR}
+.endif
+
+.include <bsd.port.post.mk>
diff --git a/devel/py-cattrs23/distinfo b/devel/py-cattrs23/distinfo
new file mode 100644
index 000000000000..4e77edfb9488
--- /dev/null
+++ b/devel/py-cattrs23/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1701363700
+SHA256 (cattrs-23.2.3.tar.gz) = a934090d95abaa9e911dac357e3a8699e0b4b14f8529bcc7d2b1ad9d51672b9f
+SIZE (cattrs-23.2.3.tar.gz) = 610215
diff --git a/devel/py-cattrs23/pkg-descr b/devel/py-cattrs23/pkg-descr
new file mode 100644
index 000000000000..7806fea5e364
--- /dev/null
+++ b/devel/py-cattrs23/pkg-descr
@@ -0,0 +1,21 @@
+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.