diff options
author | Yuri Victorovich <yuri@FreeBSD.org> | 2021-08-03 05:21:12 +0000 |
---|---|---|
committer | Yuri Victorovich <yuri@FreeBSD.org> | 2021-08-03 06:10:44 +0000 |
commit | 3397fa37713793f0795833aef4b91c639763c5c4 (patch) | |
tree | ca7f3c3bd67021eaae9c63915ffe6152dfcb7a8d | |
parent | 369ac90b862de5fa6034295d267252eaf6d43f6f (diff) | |
download | ports-3397fa37713793f0795833aef4b91c639763c5c4.tar.gz ports-3397fa37713793f0795833aef4b91c639763c5c4.zip |
math/py-unyt: New port: Package for handling numpy arrays with units
-rw-r--r-- | math/Makefile | 1 | ||||
-rw-r--r-- | math/py-unyt/Makefile | 27 | ||||
-rw-r--r-- | math/py-unyt/distinfo | 3 | ||||
-rw-r--r-- | math/py-unyt/pkg-descr | 11 |
4 files changed, 42 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile index a471c4a52c00..776eb03225bc 100644 --- a/math/Makefile +++ b/math/Makefile @@ -913,6 +913,7 @@ SUBDIR += py-theano SUBDIR += py-triangle SUBDIR += py-uncertainties + SUBDIR += py-unyt SUBDIR += py-vincenty SUBDIR += py-yt SUBDIR += py-z3-solver diff --git a/math/py-unyt/Makefile b/math/py-unyt/Makefile new file mode 100644 index 000000000000..83586c026d0e --- /dev/null +++ b/math/py-unyt/Makefile @@ -0,0 +1,27 @@ +PORTNAME= unyt +DISTVERSION= 2.8.0 +CATEGORIES= math python +MASTER_SITES= CHEESESHOP +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Package for handling numpy arrays with units + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +PY_DEPENDS= ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}sympy>=1.2:math/py-sympy@${PY_FLAVOR} +BUILD_DEPENDS= ${PY_DEPENDS} +RUN_DEPENDS= ${PY_DEPENDS} +TEST_DEPENDS= py.test:devel/py-pytest@${PY_FLAVOR} + +USES= python:3.6+ +USE_PYTHON= distutils autoplist + +NO_ARCH= yes + +do-test: # tests fail: https://github.com/yt-project/unyt/issues/192 + @cd ${WRKSRC} && pytest + +.include <bsd.port.mk> diff --git a/math/py-unyt/distinfo b/math/py-unyt/distinfo new file mode 100644 index 000000000000..50a9f891deb1 --- /dev/null +++ b/math/py-unyt/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1627952296 +SHA256 (unyt-2.8.0.tar.gz) = 6a17f849af0ec376fccb111c26b767022189d157d416f0fe5078f31b6b01a22e +SIZE (unyt-2.8.0.tar.gz) = 324621 diff --git a/math/py-unyt/pkg-descr b/math/py-unyt/pkg-descr new file mode 100644 index 000000000000..97d6e313ddd7 --- /dev/null +++ b/math/py-unyt/pkg-descr @@ -0,0 +1,11 @@ +A package for handling numpy arrays with units. + +Often writing code that deals with data that has units can be confusing. +A function might return an array but at least with plain NumPy arrays, there is +no way to easily tell what the units of the data are without somehow knowing a +priori. + +The unyt package (pronounced like "unit") provides a subclass of NumPy's ndarray +class that knows about units. + +WWW: https://github.com/yt-project/unyt |