git: 21505dcf0bc2 - main - math/py-pytensor: New port: Optimizing compiler for evaluating mathematical expressions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 21 Jun 2023 03:47:49 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=21505dcf0bc2beb3b71e664a6e3704873d42367b commit 21505dcf0bc2beb3b71e664a6e3704873d42367b Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2023-06-21 02:37:42 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2023-06-21 03:47:43 +0000 math/py-pytensor: New port: Optimizing compiler for evaluating mathematical expressions --- math/Makefile | 1 + math/py-pytensor/Makefile | 38 ++++++++++++++++++++++++++++++++++++++ math/py-pytensor/distinfo | 3 +++ math/py-pytensor/pkg-descr | 11 +++++++++++ 4 files changed, 53 insertions(+) diff --git a/math/Makefile b/math/Makefile index 39adc901b944..3155355f9629 100644 --- a/math/Makefile +++ b/math/Makefile @@ -1024,6 +1024,7 @@ SUBDIR += py-pystan SUBDIR += py-pysym SUBDIR += py-pytanque + SUBDIR += py-pytensor SUBDIR += py-python-fcl SUBDIR += py-python-louvain SUBDIR += py-python-picard diff --git a/math/py-pytensor/Makefile b/math/py-pytensor/Makefile new file mode 100644 index 000000000000..e5aa596b05aa --- /dev/null +++ b/math/py-pytensor/Makefile @@ -0,0 +1,38 @@ +PORTNAME= pytensor +DISTVERSION= 2.12.3 +CATEGORIES= math python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Optimizing compiler for evaluating mathematical expressions +WWW= https://pytensor.readthedocs.io/en/latest/ + +LICENSE= BSD3CLAUSE +LICENSE_FILE= ${WRKSRC}/doc/LICENSE.txt + +PY_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cons>0:devel/py-cons@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}etuples>=0:devel/py-etuples@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}filelock>0:sysutils/py-filelock@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}logical-unification>0:math/py-logical-unification@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}miniKanren>0:devel/py-miniKanren@${PY_FLAVOR} \ + ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}scipy>=0.14:science/py-scipy@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR} +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}setuptools>=48.0.0:devel/py-setuptools@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}versioneer>0:devel/py-versioneer@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR} \ + ${PY_DEPENDS} +RUN_DEPENDS= ${PY_DEPENDS} + +USES= python:3.8+ shebangfix +USE_PYTHON= pep517 cython autoplist pytest # tests fail to run, see https://github.com/pymc-devs/pytensor/issues/355 + +SHEBANG_FILES= bin/pytensor-cache + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/pytensor/scan/scan_perform${PYTHON_EXT_SUFFIX}.so + +# BUG: installs the file /usr/local/lib/python3.9/site-packages/bin/__init__.py, see https://github.com/pymc-devs/pytensor/issues/356 + +.include <bsd.port.mk> diff --git a/math/py-pytensor/distinfo b/math/py-pytensor/distinfo new file mode 100644 index 000000000000..62649951e54b --- /dev/null +++ b/math/py-pytensor/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1687312397 +SHA256 (pytensor-2.12.3.tar.gz) = fa82d29ef0594e0a2751eaad40882dcd6af51333c28be0d79c1d0de9f3a81a86 +SIZE (pytensor-2.12.3.tar.gz) = 3526391 diff --git a/math/py-pytensor/pkg-descr b/math/py-pytensor/pkg-descr new file mode 100644 index 000000000000..253c390be92c --- /dev/null +++ b/math/py-pytensor/pkg-descr @@ -0,0 +1,11 @@ +PyTensor is a fork of Aesara - a Python library that allows one to define, +optimize, and efficiently evaluate mathematical expressions involving +multi-dimensional arrays. + +Features: +* A hackable, pure-Python codebase +* Extensible graph framework suitable for rapid development of custom operators + and symbolic optimizations +* Implements an extensible graph transpilation framework that currently provides + compilation via C, JAX, and Numba +* Based on one of the most widely-used Python tensor libraries: Theano