git: ff49064fd1aa - main - math/py-diffcp: New port: Differentiation through cone programs
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Jun 2024 19:03:24 UTC
The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=ff49064fd1aa9a5ed1549977a93db59f0612d415 commit ff49064fd1aa9a5ed1549977a93db59f0612d415 Author: Yuri Victorovich <yuri@FreeBSD.org> AuthorDate: 2024-06-19 18:49:28 +0000 Commit: Yuri Victorovich <yuri@FreeBSD.org> CommitDate: 2024-06-19 19:03:11 +0000 math/py-diffcp: New port: Differentiation through cone programs --- math/Makefile | 1 + math/py-diffcp/Makefile | 31 +++++++++++++++++++++++++++++++ math/py-diffcp/distinfo | 3 +++ math/py-diffcp/files/patch-pyproject.toml | 15 +++++++++++++++ math/py-diffcp/pkg-descr | 4 ++++ 5 files changed, 54 insertions(+) diff --git a/math/Makefile b/math/Makefile index f12ec7442a89..44e78e22da9a 100644 --- a/math/Makefile +++ b/math/Makefile @@ -930,6 +930,7 @@ SUBDIR += py-cypari2 SUBDIR += py-deap SUBDIR += py-dgl + SUBDIR += py-diffcp SUBDIR += py-dionysus SUBDIR += py-disjoint-set SUBDIR += py-docplex diff --git a/math/py-diffcp/Makefile b/math/py-diffcp/Makefile new file mode 100644 index 000000000000..cbcbe2e4436d --- /dev/null +++ b/math/py-diffcp/Makefile @@ -0,0 +1,31 @@ +PORTNAME= diffcp +DISTVERSION= 1.0.23 +CATEGORIES= math python +MASTER_SITES= PYPI +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= yuri@FreeBSD.org +COMMENT= Differentiation through cone programs +WWW= https://github.com/cvxgrp/diffcp/ + +LICENSE= APACHE20 +LICENSE_FILE= ${WRKSRC}/LICENSE + +PY_DEPENDS= ${PYNUMPY} \ + ${PYTHON_PKGNAMEPREFIX}pybind11>0:devel/py-pybind11@${PY_FLAVOR} \ + ${PYTHON_PKGNAMEPREFIX}scipy>=0.13.2:science/py-scipy@${PY_FLAVOR} +BUILD_DEPENDS= ${PY_SETUPTOOLS} \ + ${PY_DEPENDS} \ + ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR} +RUN_DEPENDS= ${PY_DEPENDS} +TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cvxpy>0:math/py-cvxpy@${PY_FLAVOR} + +USES= compiler:c++11-lang python +USE_PYTHON= pep517 autoplist pytest + +TEST_ENV= ${MAKE_ENV} PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} + +post-install: + @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/_diffcp${PYTHON_EXT_SUFFIX}.so + +.include <bsd.port.mk> diff --git a/math/py-diffcp/distinfo b/math/py-diffcp/distinfo new file mode 100644 index 000000000000..e576e6e42778 --- /dev/null +++ b/math/py-diffcp/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1718822369 +SHA256 (diffcp-1.0.23.tar.gz) = 09fdcb3bc23668ccd09fdf3e20f790518c5b9be1877770bb6c265380c34f2199 +SIZE (diffcp-1.0.23.tar.gz) = 2198434 diff --git a/math/py-diffcp/files/patch-pyproject.toml b/math/py-diffcp/files/patch-pyproject.toml new file mode 100644 index 000000000000..dce6bde7455a --- /dev/null +++ b/math/py-diffcp/files/patch-pyproject.toml @@ -0,0 +1,15 @@ +--- pyproject.toml.orig 2024-06-19 18:46:39 UTC ++++ pyproject.toml +@@ -2,9 +2,9 @@ requires = [ + requires = [ + "numpy>=1.15,<1.16; python_version=='3.7'", + "numpy>=1.17,<1.18; python_version=='3.8'", +- "numpy>=1.19,<1.20; python_version=='3.9'", +- "numpy>=1.21,<1.22; python_version=='3.10'", +- "numpy>=1.23,<1.24; python_version=='3.11'", ++ "numpy; python_version=='3.9'", ++ "numpy; python_version=='3.10'", ++ "numpy; python_version=='3.11'", + "scipy>=1.1.0", + "pybind11>=2.4", + "setuptools", diff --git a/math/py-diffcp/pkg-descr b/math/py-diffcp/pkg-descr new file mode 100644 index 000000000000..d8017cbac786 --- /dev/null +++ b/math/py-diffcp/pkg-descr @@ -0,0 +1,4 @@ +diffcp is a Python package for computing the derivative of a convex cone +program, with respect to its problem data. The derivative is implemented +as an abstract linear map, with methods for its forward application and +its adjoint.