aboutsummaryrefslogtreecommitdiff
path: root/www/py-dj52-django-prometheus
diff options
context:
space:
mode:
Diffstat (limited to 'www/py-dj52-django-prometheus')
-rw-r--r--www/py-dj52-django-prometheus/Makefile39
-rw-r--r--www/py-dj52-django-prometheus/distinfo3
-rw-r--r--www/py-dj52-django-prometheus/files/patch-pyproject.toml11
-rw-r--r--www/py-dj52-django-prometheus/files/patch-setup.py13
-rw-r--r--www/py-dj52-django-prometheus/pkg-descr14
5 files changed, 80 insertions, 0 deletions
diff --git a/www/py-dj52-django-prometheus/Makefile b/www/py-dj52-django-prometheus/Makefile
new file mode 100644
index 000000000000..6981abef67e2
--- /dev/null
+++ b/www/py-dj52-django-prometheus/Makefile
@@ -0,0 +1,39 @@
+PORTNAME= django-prometheus
+DISTVERSION= 2.4.1
+CATEGORIES= www python
+MASTER_SITES= PYPI
+PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}dj52-
+DISTNAME= django_prometheus-${DISTVERSION}
+
+MAINTAINER= kai@FreeBSD.org
+COMMENT= Export Django monitoring metrics for Prometheus.io
+WWW= https://github.com/django-commons/django-prometheus
+
+LICENSE= APACHE20
+
+BUILD_DEPENDS= ${PY_SETUPTOOLS} \
+ ${PYTHON_PKGNAMEPREFIX}wheel>=0.40.0:devel/py-wheel@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}django52>=4.2<6.0:www/py-django52@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}prometheus-client>=0.7:net-mgmt/py-prometheus-client@${PY_FLAVOR}
+
+USES= python:3.10+
+USE_PYTHON= autoplist pep517 pytest
+
+TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}
+
+CONFLICTS_INSTALL= ${PYTHON_PKGNAMEPREFIX}*${PORTNAME}
+
+NO_ARCH= yes
+
+OPTIONS_GROUP= DATABASE CACHE
+OPTIONS_GROUP_CACHE= MEMCACHED REDIS
+OPTIONS_GROUP_DATABASE= MYSQL PGSQL
+
+MEMCACHED_DESC= Memcached distributed memory caching support
+
+MEMCACHED_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}python-memcached>=0:databases/py-python-memcached@${PY_FLAVOR}
+MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}mysqlclient>=0:databases/py-mysqlclient@${PY_FLAVOR}
+PGSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}psycopg>=0:databases/py-psycopg@${PY_FLAVOR}
+REDIS_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}dj52-django-redis>=4.12.1:www/py-dj52-django-redis@${PY_FLAVOR}
+
+.include <bsd.port.mk>
diff --git a/www/py-dj52-django-prometheus/distinfo b/www/py-dj52-django-prometheus/distinfo
new file mode 100644
index 000000000000..a97af1466c0e
--- /dev/null
+++ b/www/py-dj52-django-prometheus/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1751183595
+SHA256 (django_prometheus-2.4.1.tar.gz) = 073628243d2a6de6a8a8c20e5b512872dfb85d66e1b60b28bcf1eca0155dad95
+SIZE (django_prometheus-2.4.1.tar.gz) = 24464
diff --git a/www/py-dj52-django-prometheus/files/patch-pyproject.toml b/www/py-dj52-django-prometheus/files/patch-pyproject.toml
new file mode 100644
index 000000000000..31ac1775bdb0
--- /dev/null
+++ b/www/py-dj52-django-prometheus/files/patch-pyproject.toml
@@ -0,0 +1,11 @@
+Relax version requirements of py-setuptools.
+
+--- pyproject.toml.orig 2025-06-18 18:06:03 UTC
++++ pyproject.toml
+@@ -1,5 +1,5 @@
+ [build-system]
+-requires = ["setuptools >= 67.7.2, < 72.0.0", "wheel >= 0.40.0"]
++requires = ["setuptools", "wheel >= 0.40.0"]
+ build-backend = "setuptools.build_meta"
+
+ [tool.pytest.ini_options]
diff --git a/www/py-dj52-django-prometheus/files/patch-setup.py b/www/py-dj52-django-prometheus/files/patch-setup.py
new file mode 100644
index 000000000000..6e28293ebe58
--- /dev/null
+++ b/www/py-dj52-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",
diff --git a/www/py-dj52-django-prometheus/pkg-descr b/www/py-dj52-django-prometheus/pkg-descr
new file mode 100644
index 000000000000..0962e7b87336
--- /dev/null
+++ b/www/py-dj52-django-prometheus/pkg-descr
@@ -0,0 +1,14 @@
+This library exports Django monitoring metrics for Prometheus.io.
+
+It provides support to monitor the following databases types:
+
+* SQLite (via Django)
+* PostgreSQL
+* MySQL
+
+In addition, caches can also be monitored:
+
+* memcached
+* Redis
+
+It's even possible to export metrics of Django models and migrations.