git: 4a7348fd86ee - main - graphics/py-scikit-image: convert to pep517
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 22 Sep 2024 08:53:40 UTC
The branch main has been updated by makc:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4a7348fd86ee5ee6f02e474c8a8a25222ae91b6f
commit 4a7348fd86ee5ee6f02e474c8a8a25222ae91b6f
Author: Max Brazhnikov <makc@FreeBSD.org>
AuthorDate: 2024-09-22 08:52:05 +0000
Commit: Max Brazhnikov <makc@FreeBSD.org>
CommitDate: 2024-09-22 08:52:05 +0000
graphics/py-scikit-image: convert to pep517
---
graphics/py-scikit-image/Makefile | 16 +++------
.../py-scikit-image/files/patch-pyproject.toml | 42 ++++++++++++++++++++++
2 files changed, 47 insertions(+), 11 deletions(-)
diff --git a/graphics/py-scikit-image/Makefile b/graphics/py-scikit-image/Makefile
index 5fc93825aa9b..7508f070e973 100644
--- a/graphics/py-scikit-image/Makefile
+++ b/graphics/py-scikit-image/Makefile
@@ -1,7 +1,7 @@
PORTNAME= scikit-image
PORTVERSION= 0.19.3
-PORTREVISION= 3
DISTVERSIONPREFIX= v
+PORTREVISION= 3
CATEGORIES= graphics python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -14,7 +14,9 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt
BUILD_DEPENDS= ${PYNUMPY} \
${PYTHON_PKGNAMEPREFIX}packaging>0:devel/py-packaging@${PY_FLAVOR} \
- ${PYTHON_PKGNAMEPREFIX}pythran>0:devel/py-pythran@${PY_FLAVOR}
+ ${PYTHON_PKGNAMEPREFIX}pythran>0:devel/py-pythran@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}setuptools>=0:devel/py-setuptools@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYNUMPY} \
${PY_PILLOW} \
${PYTHON_PKGNAMEPREFIX}imageio>=2.4.1:graphics/py-imageio@${PY_FLAVOR} \
@@ -27,19 +29,11 @@ RUN_DEPENDS= ${PYNUMPY} \
USES= compiler:c++11-lang python shebangfix
USE_GITHUB= yes
-USE_PYTHON= autoplist concurrent distutils cython cython_run
+USE_PYTHON= autoplist concurrent cython cython_run pep517
-PYDISTUTILS_BUILD_TARGET= build build_ext
-PYDISTUTILS_BUILDARGS+= saveopts
SHEBANG_FILES= skimage/scripts/skivi
post-install:
@${FIND} ${STAGEDIR}${PYTHON_SITELIBDIR}/skimage -name "*.so" -exec ${STRIP_CMD} {} \;
-do-test:
- @cd ${WRKSRC} && \
- ${PYTHON_CMD} ${PYSETUP} build_ext -i && \
- ${PYTHON_CMD} selftest.py && \
- ${PYTHON_CMD} -m nose -vx Tests/test_*.py
-
.include <bsd.port.mk>
diff --git a/graphics/py-scikit-image/files/patch-pyproject.toml b/graphics/py-scikit-image/files/patch-pyproject.toml
new file mode 100644
index 000000000000..018f5fbe0a7d
--- /dev/null
+++ b/graphics/py-scikit-image/files/patch-pyproject.toml
@@ -0,0 +1,42 @@
+--- pyproject.toml.orig 2022-06-12 15:28:34 UTC
++++ pyproject.toml
+@@ -1,37 +1,10 @@ requires = [
+ [build-system]
+ requires = [
+ "wheel",
+- "setuptools<=59.4",
++ "setuptools",
+ "packaging",
+ "Cython>=0.29.24,<3.0",
+ "pythran",
+
+- # We follow scipy for much of these pinnings
+- # https://github.com/scipy/scipy/blob/master/pyproject.toml
+- # numpy 1.19 was the first minor release to provide aarch64 wheels, but
+- # wheels require fixes contained in numpy 1.19.2
+- "numpy==1.19.2; python_version=='3.7' and platform_machine=='aarch64'",
+- "numpy==1.19.2; python_version=='3.8' and platform_machine=='aarch64'",
+- # aarch64 for py39 and py310 are covered by the default requirement below
+-
+- # arm64 on Darwin supports Python 3.8 and above requires numpy>=1.20.0
+- "numpy==1.20.0; python_version=='3.8' and platform_machine=='arm64' and platform_system=='Darwin'",
+- "numpy==1.20.0; python_version=='3.9' and platform_machine=='arm64' and platform_system=='Darwin'",
+- # arm64 for py310 is covered by the default requirement below
+-
+- # default numpy requirements
+- "numpy==1.17.3; python_version=='3.7' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64' and platform_python_implementation != 'PyPy'",
+- "numpy==1.17.3; python_version=='3.8' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_machine!='aarch64' and platform_python_implementation != 'PyPy'",
+- "numpy==1.19.3; python_version=='3.9' and (platform_machine!='arm64' or platform_system!='Darwin') and platform_python_implementation != 'PyPy'",
+- "numpy==1.21.4; python_version=='3.10' and platform_python_implementation != 'PyPy'",
+-
+- # First PyPy versions for which there are numpy wheels
+- "numpy==1.20.0; python_version=='3.7' and platform_python_implementation=='PyPy'",
+-
+- # For Python versions which aren't yet officially supported,
+- # we specify an unpinned NumPy which allows source distributions
+- # to be used and allows wheels to be used as soon as they
+- # become available.
+- "numpy; python_version>='3.11'",
+- "numpy; python_version>='3.8' and platform_python_implementation=='PyPy'",
++ "numpy",
+ ]