summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--math/Makefile1
-rw-r--r--math/py-POT/Makefile26
-rw-r--r--math/py-POT/distinfo3
-rw-r--r--math/py-POT/files/patch-pyproject.toml9
-rw-r--r--math/py-POT/files/patch-setup.py11
-rw-r--r--math/py-POT/pkg-descr3
6 files changed, 53 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index f926b9196089..e9be23adebf1 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -877,6 +877,7 @@
SUBDIR += py-Diofant
SUBDIR += py-GridDataFormats
SUBDIR += py-MutatorMath
+ SUBDIR += py-POT
SUBDIR += py-PuLP
SUBDIR += py-Py-BOBYQA
SUBDIR += py-PyMetis
diff --git a/math/py-POT/Makefile b/math/py-POT/Makefile
new file mode 100644
index 000000000000..6e67c5285f57
--- /dev/null
+++ b/math/py-POT/Makefile
@@ -0,0 +1,26 @@
+PORTNAME= POT
+DISTVERSION= 0.9.2
+CATEGORIES= math python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Python Optimal Transport Library
+WWW= https://pythonot.github.io/
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+BUILD_DEPENDS= ${SETUPTOOLS} \
+ ${PYNUMPY} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PYNUMPY} \
+ ${PYTHON_PKGNAMEPREFIX}scipy>0:science/py-scipy@${PY_FLAVOR}
+
+USES= python
+USE_PYTHON= pep517 cython autoplist
+
+post-install:
+ @${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/ot/lp/emd_wrap${PYTHON_EXT_SUFFIX}.so
+
+.include <bsd.port.mk>
diff --git a/math/py-POT/distinfo b/math/py-POT/distinfo
new file mode 100644
index 000000000000..c281f8201db1
--- /dev/null
+++ b/math/py-POT/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1703323605
+SHA256 (POT-0.9.2.tar.gz) = 8b1ac1fca71dee525b62fd3407f296aa3cdb2b825ad751e00eb945845538084e
+SIZE (POT-0.9.2.tar.gz) = 373008
diff --git a/math/py-POT/files/patch-pyproject.toml b/math/py-POT/files/patch-pyproject.toml
new file mode 100644
index 000000000000..c2896e3923c0
--- /dev/null
+++ b/math/py-POT/files/patch-pyproject.toml
@@ -0,0 +1,9 @@
+--- pyproject.toml.orig 2023-12-23 09:30:10 UTC
++++ pyproject.toml
+@@ -1,3 +1,3 @@
+ [build-system]
+-requires = ["setuptools", "wheel", "oldest-supported-numpy", "cython>=0.23"]
+-build-backend = "setuptools.build_meta"
+\ No newline at end of file
++requires = ["setuptools", "wheel", "numpy", "cython>=0.23"]
++build-backend = "setuptools.build_meta"
diff --git a/math/py-POT/files/patch-setup.py b/math/py-POT/files/patch-setup.py
new file mode 100644
index 000000000000..dcca65464a91
--- /dev/null
+++ b/math/py-POT/files/patch-setup.py
@@ -0,0 +1,11 @@
+--- setup.py.orig 2023-12-23 09:28:27 UTC
++++ setup.py
+@@ -68,7 +68,7 @@ setup(
+ license='MIT',
+ scripts=[],
+ data_files=[],
+- setup_requires=["oldest-supported-numpy", "cython>=0.23"],
++ setup_requires=["numpy", "cython>=0.23"],
+ install_requires=["numpy>=1.16", "scipy>=1.6"],
+ python_requires=">=3.6",
+ classifiers=[
diff --git a/math/py-POT/pkg-descr b/math/py-POT/pkg-descr
new file mode 100644
index 000000000000..1e35ed50b08d
--- /dev/null
+++ b/math/py-POT/pkg-descr
@@ -0,0 +1,3 @@
+Python Optimal Transport Library provide several solvers for optimization
+problems related to Optimal Transport for signal, image processing and
+machine learning.