aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-08-16 18:06:34 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-08-16 18:25:05 +0000
commit9b4992baf6eb7db7cdbada0e6013a0f6e0304557 (patch)
tree418126c544827ca7c5f6feaa92f4d88b6b39fddb
parentb4ec23b97c581e899be514a2d637e7e42394a022 (diff)
devel/py-dataclass-array: Add py-dataclass-array 1.5.0
DataclassArray are dataclasses which behave like numpy-like arrays (can be batched, reshaped, sliced,...), compatible with Jax, TensorFlow, and numpy (with torch support planned). This reduce boilerplate and improve readability.
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-dataclass-array/Makefile27
-rw-r--r--devel/py-dataclass-array/distinfo3
-rw-r--r--devel/py-dataclass-array/pkg-descr5
4 files changed, 36 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index fff5d1d64457..3c9648a690af 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4546,6 +4546,7 @@
SUBDIR += py-darts.util.lru
SUBDIR += py-dask
SUBDIR += py-dask-histogram
+ SUBDIR += py-dataclass-array
SUBDIR += py-dataclasses-json
SUBDIR += py-datadog
SUBDIR += py-datapackage
diff --git a/devel/py-dataclass-array/Makefile b/devel/py-dataclass-array/Makefile
new file mode 100644
index 000000000000..22103b267b98
--- /dev/null
+++ b/devel/py-dataclass-array/Makefile
@@ -0,0 +1,27 @@
+PORTNAME= dataclass-array
+PORTVERSION= 1.5.0
+CATEGORIES= devel python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= dataclass_array-${PORTVERSION}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Dataclasses that behave like numpy arrays (with indexing, slicing, vectorization)
+WWW= https://github.com/google-research/dataclass_array
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}flit-core>=3.8<4:devel/py-flit-core@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}einops>=0:misc/py-einops@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}etils>=0:devel/py-etils@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}lark>=0:devel/py-lark@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}typing-extensions>=0:devel/py-typing-extensions@${PY_FLAVOR}
+
+USES= python:3.9+
+USE_PYTHON= autoplist concurrent pep517
+
+NO_ARCH= yes
+
+.include <bsd.port.mk>
diff --git a/devel/py-dataclass-array/distinfo b/devel/py-dataclass-array/distinfo
new file mode 100644
index 000000000000..743ef80c5886
--- /dev/null
+++ b/devel/py-dataclass-array/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1691069892
+SHA256 (dataclass_array-1.5.0.tar.gz) = 8efe79d61df43869679fbd569fe8a74b432e62b50e7dd1eaf2cd7de951319b22
+SIZE (dataclass_array-1.5.0.tar.gz) = 34757
diff --git a/devel/py-dataclass-array/pkg-descr b/devel/py-dataclass-array/pkg-descr
new file mode 100644
index 000000000000..44149ccc9080
--- /dev/null
+++ b/devel/py-dataclass-array/pkg-descr
@@ -0,0 +1,5 @@
+DataclassArray are dataclasses which behave like numpy-like arrays (can be
+batched, reshaped, sliced,...), compatible with Jax, TensorFlow, and numpy (with
+torch support planned).
+
+This reduce boilerplate and improve readability.