From 0072b15245c61b6daa8d53f35d3695f3dcc06550 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 29 Dec 2021 14:01:30 +0100 Subject: [PATCH 1/2] python3Packages.prometheus-client: disable on older Python releases --- .../python-modules/prometheus-client/default.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/prometheus-client/default.nix b/pkgs/development/python-modules/prometheus-client/default.nix index 6c7cede280cf..7af4e2b02faa 100644 --- a/pkgs/development/python-modules/prometheus-client/default.nix +++ b/pkgs/development/python-modules/prometheus-client/default.nix @@ -2,11 +2,15 @@ , buildPythonPackage , fetchFromGitHub , pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "prometheus-client"; version = "0.12.0"; + format = "setuptools"; + + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "prometheus"; @@ -19,11 +23,14 @@ buildPythonPackage rec { pytestCheckHook ]; - pythonImportsCheck = [ "prometheus_client" ]; + pythonImportsCheck = [ + "prometheus_client" + ]; meta = with lib; { description = "Prometheus instrumentation library for Python applications"; homepage = "https://github.com/prometheus/client_python"; license = licenses.asl20; + maintainers = with maintainers; [ ]; }; } From e8124f65e686d82152d56d357a315fbaacbd6e4a Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 29 Dec 2021 14:06:05 +0100 Subject: [PATCH 2/2] python3Packages.karton-dashboard: update substituteInPlace --- pkgs/development/python-modules/karton-dashboard/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/karton-dashboard/default.nix b/pkgs/development/python-modules/karton-dashboard/default.nix index 08eeed7141ae..5b67123ee278 100644 --- a/pkgs/development/python-modules/karton-dashboard/default.nix +++ b/pkgs/development/python-modules/karton-dashboard/default.nix @@ -5,6 +5,7 @@ , karton-core , mistune , prometheus-client +, pythonOlder }: buildPythonPackage rec { @@ -12,6 +13,8 @@ buildPythonPackage rec { version = "1.2.1"; format = "setuptools"; + disabled = pythonOlder "3.7"; + src = fetchFromGitHub { owner = "CERT-Polska"; repo = pname; @@ -29,7 +32,7 @@ buildPythonPackage rec { postPatch = '' substituteInPlace requirements.txt \ --replace "Flask==1.1.1" "Flask" \ - --replace "prometheus-client==0.10.0" "prometheus-client" + --replace "prometheus_client==0.11.0" "prometheus_client" ''; # Project has no tests. pythonImportsCheck requires MinIO configuration