From 3d6feffdc4611a657e3d7a4d62e94bcf81f320cd Mon Sep 17 00:00:00 2001 From: phaer Date: Wed, 26 Oct 2022 13:37:15 +0200 Subject: [PATCH 1/2] python310Packages.python-keycloak: 0.27.0 -> 2.6.0 --- .../python-keycloak/default.nix | 31 ++++++++++++------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/python-keycloak/default.nix b/pkgs/development/python-modules/python-keycloak/default.nix index 0d2be6a4d145..d39e1085c78f 100644 --- a/pkgs/development/python-modules/python-keycloak/default.nix +++ b/pkgs/development/python-modules/python-keycloak/default.nix @@ -2,32 +2,41 @@ , buildPythonPackage , fetchFromGitHub , requests +, requests-toolbelt +, urllib3 , python-jose -, httmock -, unittestCheckHook +, poetry-core }: buildPythonPackage rec { pname = "python-keycloak"; - version = "0.27.0"; + version = "2.6.0"; + format = "pyproject"; src = fetchFromGitHub { owner = "marcospereirampj"; repo = "python-keycloak"; - rev = version; - sha256 = "sha256-XCOfzzUs0K5/peprgpEXY2pX6wYOF7hg9ec1XPEYHCI="; + rev = "v${version}"; + sha256 = "sha256-cuj0gJlZDkbJ2HRSMcQvO4nxpjw65CKGEpWCL5sucvg="; }; + postPatch = '' + substituteInPlace pyproject.toml \ + --replace 'version = "0.0.0"' 'version = "${version}"' + ''; + + buildInputs = [ + poetry-core + ]; + propagatedBuildInputs = [ - requests python-jose + urllib3 + requests + requests-toolbelt ]; - checkInputs = [ - unittestCheckHook - httmock - ]; - + doTest = false; # test fixtures require a running keycloak instance pythonImportsCheck = [ "keycloak" ]; meta = with lib; { From 828e14c52d84fec7c53f0207f185c8bccb4710d6 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 26 Oct 2022 22:23:05 +0200 Subject: [PATCH 2/2] python310Packages.python-keycloak: disable on older Python releases --- .../python-modules/python-keycloak/default.nix | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/python-keycloak/default.nix b/pkgs/development/python-modules/python-keycloak/default.nix index d39e1085c78f..ea96e00abeaf 100644 --- a/pkgs/development/python-modules/python-keycloak/default.nix +++ b/pkgs/development/python-modules/python-keycloak/default.nix @@ -1,11 +1,12 @@ { lib , buildPythonPackage , fetchFromGitHub +, poetry-core +, python-jose +, pythonOlder , requests , requests-toolbelt , urllib3 -, python-jose -, poetry-core }: buildPythonPackage rec { @@ -13,11 +14,13 @@ buildPythonPackage rec { version = "2.6.0"; format = "pyproject"; + disabled = pythonOlder "3.7"; + src = fetchFromGitHub { owner = "marcospereirampj"; repo = "python-keycloak"; rev = "v${version}"; - sha256 = "sha256-cuj0gJlZDkbJ2HRSMcQvO4nxpjw65CKGEpWCL5sucvg="; + hash = "sha256-cuj0gJlZDkbJ2HRSMcQvO4nxpjw65CKGEpWCL5sucvg="; }; postPatch = '' @@ -36,8 +39,12 @@ buildPythonPackage rec { requests-toolbelt ]; - doTest = false; # test fixtures require a running keycloak instance - pythonImportsCheck = [ "keycloak" ]; + # Test fixtures require a running keycloak instance + doTest = false; + + pythonImportsCheck = [ + "keycloak" + ]; meta = with lib; { description = "Provides access to the Keycloak API";