python312Packages.kubernetes: refactor

This commit is contained in:
Fabian Affolter 2024-03-26 11:06:41 +01:00
parent b310900280
commit 4d403ea87e
1 changed files with 24 additions and 14 deletions

View File

@ -1,14 +1,15 @@
{ lib
, stdenv
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
# propgatedBuildInputs
, adal
, buildPythonPackage
, certifi
, fetchFromGitHub
, google-auth
, mock
, pytestCheckHook
, python-dateutil
, pythonOlder
, pythonRelaxDepsHook
, pyyaml
, requests
, requests-oauthlib
@ -16,16 +17,12 @@
, six
, urllib3
, websocket-client
# tests
, pytestCheckHook
, mock
}:
buildPythonPackage rec {
pname = "kubernetes";
version = "28.1.0";
format = "setuptools";
pyproject = true;
disabled = pythonOlder "3.6";
@ -36,20 +33,33 @@ buildPythonPackage rec {
hash = "sha256-NKrxv5a5gkgpNG7yViTKYBYnU249taWl6fkPJa7/Rzo=";
};
propagatedBuildInputs = [
adal
pythonRelaxDeps = [
"urllib3"
];
build-system = [
pythonRelaxDepsHook
setuptools
];
dependencies = [
certifi
google-auth
python-dateutil
pyyaml
requests
requests-oauthlib
setuptools
six
urllib3
websocket-client
];
passthru.optional-dependencies = {
adal = [
adal
];
};
pythonImportsCheck = [
"kubernetes"
];
@ -57,7 +67,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
mock
pytestCheckHook
];
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
disabledTests = lib.optionals stdenv.isDarwin [
# AssertionError: <class 'urllib3.poolmanager.ProxyManager'> != <class 'urllib3.poolmanager.Poolmanager'>