diff --git a/pkgs/development/python-modules/django-prometheus/default.nix b/pkgs/development/python-modules/django-prometheus/default.nix index 3e2c03771bf4..d07951e64222 100644 --- a/pkgs/development/python-modules/django-prometheus/default.nix +++ b/pkgs/development/python-modules/django-prometheus/default.nix @@ -1,8 +1,8 @@ { lib, buildPythonPackage, - pythonOlder, fetchFromGitHub, + setuptools, prometheus-client, pytest-django, pytestCheckHook, @@ -10,25 +10,27 @@ buildPythonPackage rec { pname = "django-prometheus"; - version = "2.3.1"; - format = "setuptools"; - disabled = pythonOlder "3.6"; + version = "2.4.0"; + pyproject = true; src = fetchFromGitHub { - owner = "korfuri"; + owner = "django-commons"; repo = "django-prometheus"; - rev = "v${version}"; - hash = "sha256-JiLH+4mmNdb9BN81J5YFiMPna/3gaKUK6ARjmCa3fE8="; + tag = "v${version}"; + hash = "sha256-cKkpsV3w2SUvQuSBm0MlTsomdrU4h7CS5L+nKFvrKA8="; }; - patches = [ ./drop-untestable-database-backends.patch ]; - postPatch = '' + substituteInPlace pyproject.toml \ + --replace-fail "setuptools >= 67.7.2, < 72.0.0" setuptools + substituteInPlace setup.py \ - --replace '"pytest-runner"' "" + --replace-fail '"pytest-runner"' "" ''; - propagatedBuildInputs = [ prometheus-client ]; + build-system = [ setuptools ]; + + dependencies = [ prometheus-client ]; pythonImportsCheck = [ "django_prometheus" ]; @@ -38,9 +40,9 @@ buildPythonPackage rec { ]; meta = with lib; { - changelog = "https://github.com/korfuri/django-prometheus/releases/tag/v${version}"; + changelog = "https://github.com/django-commons/django-prometheus/releases/tag/v${version}"; description = "Django middlewares to monitor your application with Prometheus.io"; - homepage = "https://github.com/korfuri/django-prometheus"; + homepage = "https://github.com/django-commons/django-prometheus"; license = licenses.asl20; maintainers = with maintainers; [ hexa ]; }; diff --git a/pkgs/development/python-modules/django-prometheus/drop-untestable-database-backends.patch b/pkgs/development/python-modules/django-prometheus/drop-untestable-database-backends.patch deleted file mode 100644 index 41f1229c5e59..000000000000 --- a/pkgs/development/python-modules/django-prometheus/drop-untestable-database-backends.patch +++ /dev/null @@ -1,38 +0,0 @@ -diff --git a/django_prometheus/tests/end2end/testapp/settings.py b/django_prometheus/tests/end2end/testapp/settings.py -index cdd167f..5c6073b 100644 ---- a/django_prometheus/tests/end2end/testapp/settings.py -+++ b/django_prometheus/tests/end2end/testapp/settings.py -@@ -53,33 +53,6 @@ DATABASES = { - "ENGINE": "django_prometheus.db.backends.sqlite3", - "NAME": "db.sqlite3", - }, -- # Comment this to not test django_prometheus.db.backends.postgres. -- "postgresql": { -- "ENGINE": "django_prometheus.db.backends.postgresql", -- "NAME": "postgres", -- "USER": "postgres", -- "PASSWORD": "", -- "HOST": "localhost", -- "PORT": "5432", -- }, -- # Comment this to not test django_prometheus.db.backends.postgis. -- "postgis": { -- "ENGINE": "django_prometheus.db.backends.postgis", -- "NAME": "postgis", -- "USER": "postgres", -- "PASSWORD": "", -- "HOST": "localhost", -- "PORT": "5432", -- }, -- # Comment this to not test django_prometheus.db.backends.mysql. -- "mysql": { -- "ENGINE": "django_prometheus.db.backends.mysql", -- "NAME": "django_prometheus_1", -- "USER": "root", -- "PASSWORD": "", -- "HOST": "127.0.0.1", -- "PORT": "3306", -- }, - # The following databases are used by test_db.py only - "test_db_1": { - "ENGINE": "django_prometheus.db.backends.sqlite3",