git: 5f45571141a7 - main - www/py-django-prometheus: Convert to PEP517
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 06 Oct 2024 14:27:21 UTC
The branch main has been updated by kai:
URL: https://cgit.FreeBSD.org/ports/commit/?id=5f45571141a7750966fcbd0827b27ae7aeb8223e
commit 5f45571141a7750966fcbd0827b27ae7aeb8223e
Author: Kai Knoblich <kai@FreeBSD.org>
AuthorDate: 2024-10-06 14:25:28 +0000
Commit: Kai Knoblich <kai@FreeBSD.org>
CommitDate: 2024-10-06 14:27:02 +0000
www/py-django-prometheus: Convert to PEP517
* Switch to the PEP517 build framework and remove py-pytest-runner as a
build time dependency while I'm here, because upstream of it has
archived the project with the following notice:
pytest-runner depends on deprecated features of setuptools and relies
on features that break security mechanisms in pip. For example
'setup_requires' and 'tests_require' bypass pip --require-hashes.
See also https://github.com/pypa/setuptools/issues/1684
* Bump PORTREVISION due package change.
---
www/py-django-prometheus/Makefile | 7 ++++---
www/py-django-prometheus/files/patch-pyproject.toml | 11 +++++++++++
www/py-django-prometheus/files/patch-setup.py | 13 +++++++++++++
3 files changed, 28 insertions(+), 3 deletions(-)
diff --git a/www/py-django-prometheus/Makefile b/www/py-django-prometheus/Makefile
index 364301836a51..deae74c8bbc1 100644
--- a/www/py-django-prometheus/Makefile
+++ b/www/py-django-prometheus/Makefile
@@ -1,6 +1,6 @@
PORTNAME= django-prometheus
PORTVERSION= 2.3.1
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www python
MASTER_SITES= PYPI
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@@ -11,12 +11,13 @@ WWW= https://github.com/korfuri/django-prometheus
LICENSE= APACHE20
-BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest-runner>0:devel/py-pytest-runner@${PY_FLAVOR}
+BUILD_DEPENDS= ${PY_SETUPTOOLS} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0.40.0:devel/py-wheel@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django42>=3.2:www/py-django42@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}prometheus-client>=0.7:net-mgmt/py-prometheus-client@${PY_FLAVOR}
USES= python
-USE_PYTHON= autoplist distutils pytest
+USE_PYTHON= autoplist pep517 pytest
TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
diff --git a/www/py-django-prometheus/files/patch-pyproject.toml b/www/py-django-prometheus/files/patch-pyproject.toml
new file mode 100644
index 000000000000..5bf778c4f9e3
--- /dev/null
+++ b/www/py-django-prometheus/files/patch-pyproject.toml
@@ -0,0 +1,11 @@
+Relax version requirements of py-setuptools.
+
+--- pyproject.toml.orig 2024-10-06 12:58:05 UTC
++++ pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = [ "setuptools >= 67.7.2", "wheel >= 0.40.0"]
++requires = [ "setuptools", "wheel >= 0.40.0"]
+ build-backend = "setuptools.build_meta"
+
+ [tool.pytest.ini_options]
diff --git a/www/py-django-prometheus/files/patch-setup.py b/www/py-django-prometheus/files/patch-setup.py
new file mode 100644
index 000000000000..6e28293ebe58
--- /dev/null
+++ b/www/py-django-prometheus/files/patch-setup.py
@@ -0,0 +1,13 @@
+Remove py-pytest-runner as build time dependency because it is deprecated and
+should be no longer used.
+
+--- setup.py.orig 2024-10-01 12:41:04 UTC
++++ setup.py
+@@ -40,7 +40,6 @@ setup(
+ long_description=LONG_DESCRIPTION,
+ long_description_content_type="text/markdown",
+ tests_require=["pytest", "pytest-django"],
+- setup_requires=["pytest-runner"],
+ options={"bdist_wheel": {"universal": "1"}},
+ install_requires=[
+ "prometheus-client>=0.7",