aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-10-08 11:52:35 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2023-10-08 11:52:35 +0000
commitd142b1f5ed5be6acc1c72a32a552035ba89af8e4 (patch)
treeede6df0a2f9a0da556912680db5f4dd399c749f9
parent06b2f3340c1f6dc764575a8e836c0e2fb226e0b7 (diff)
downloadports-d142b1f5ed5be6acc1c72a32a552035ba89af8e4.tar.gz
ports-d142b1f5ed5be6acc1c72a32a552035ba89af8e4.zip
devel/py-array-api-compat: Add py-array-api-compat 1.4
This is a small wrapper around common array libraries that is compatible with the Array API standard. Currently, NumPy, CuPy, and PyTorch are supported. Note that some of the functionality in this library is backwards incompatible with the corresponding wrapped libraries. The end-goal is to eventually make each array library itself fully compatible with the array API, but this requires making backwards incompatible changes in many cases, so this will take some time. Currently all libraries here are implemented against the 2022.12 version of the standard.
-rw-r--r--devel/Makefile1
-rw-r--r--devel/py-array-api-compat/Makefile25
-rw-r--r--devel/py-array-api-compat/distinfo3
-rw-r--r--devel/py-array-api-compat/pkg-descr11
4 files changed, 40 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile
index e358569a45c1..d80c31fb1b78 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -4249,6 +4249,7 @@
SUBDIR += py-argparse
SUBDIR += py-args
SUBDIR += py-arpeggio
+ SUBDIR += py-array-api-compat
SUBDIR += py-arrow
SUBDIR += py-asciimatics
SUBDIR += py-asgi-lifespan
diff --git a/devel/py-array-api-compat/Makefile b/devel/py-array-api-compat/Makefile
new file mode 100644
index 000000000000..0373a788ba3b
--- /dev/null
+++ b/devel/py-array-api-compat/Makefile
@@ -0,0 +1,25 @@
+PORTNAME= array-api-compat
+PORTVERSION= 1.4
+CATEGORIES= devel python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+DISTNAME= array_api_compat-${PORTVERSION}
+
+MAINTAINER= sunpoet@FreeBSD.org
+COMMENT= Array API compatibility library
+WWW= https://data-apis.org/array-api-compat/ \
+ https://github.com/data-apis/array-api-compat
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= python
+USE_PYTHON= autoplist concurrent distutils
+
+NO_ARCH= yes
+
+OPTIONS_DEFINE= NUMPY
+
+NUMPY_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}numpy>=0,1:math/py-numpy@${PY_FLAVOR}
+
+.include <bsd.port.mk>
diff --git a/devel/py-array-api-compat/distinfo b/devel/py-array-api-compat/distinfo
new file mode 100644
index 000000000000..fec2d702c35f
--- /dev/null
+++ b/devel/py-array-api-compat/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1696753602
+SHA256 (array_api_compat-1.4.tar.gz) = d49f00eb66b436cf3a6026d6f43c115d3e058a3a9936536b0bac33dd470e8b4d
+SIZE (array_api_compat-1.4.tar.gz) = 29461
diff --git a/devel/py-array-api-compat/pkg-descr b/devel/py-array-api-compat/pkg-descr
new file mode 100644
index 000000000000..b7cf82effdec
--- /dev/null
+++ b/devel/py-array-api-compat/pkg-descr
@@ -0,0 +1,11 @@
+This is a small wrapper around common array libraries that is compatible with
+the Array API standard. Currently, NumPy, CuPy, and PyTorch are supported.
+
+Note that some of the functionality in this library is backwards incompatible
+with the corresponding wrapped libraries. The end-goal is to eventually make
+each array library itself fully compatible with the array API, but this requires
+making backwards incompatible changes in many cases, so this will take some
+time.
+
+Currently all libraries here are implemented against the 2022.12 version of the
+standard.