2021-09-23 20:09:25 +00:00
|
|
|
{ lib
|
2022-03-18 03:25:40 +00:00
|
|
|
, stdenv
|
2021-09-23 20:09:25 +00:00
|
|
|
, adal
|
2024-03-26 10:06:41 +00:00
|
|
|
, buildPythonPackage
|
2021-09-23 20:09:25 +00:00
|
|
|
, certifi
|
2024-03-26 10:06:41 +00:00
|
|
|
, fetchFromGitHub
|
2021-09-23 20:09:25 +00:00
|
|
|
, google-auth
|
2024-03-26 10:06:41 +00:00
|
|
|
, mock
|
|
|
|
, pytestCheckHook
|
2021-09-23 20:09:25 +00:00
|
|
|
, python-dateutil
|
2024-03-26 10:06:41 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pythonRelaxDepsHook
|
2021-09-23 20:09:25 +00:00
|
|
|
, pyyaml
|
|
|
|
, requests
|
2022-02-25 14:30:48 +00:00
|
|
|
, requests-oauthlib
|
2022-05-30 04:09:24 +00:00
|
|
|
, setuptools
|
|
|
|
, six
|
2021-09-23 20:09:25 +00:00
|
|
|
, urllib3
|
|
|
|
, websocket-client
|
|
|
|
}:
|
2018-02-26 12:45:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "kubernetes";
|
2024-04-08 13:45:13 +00:00
|
|
|
version = "29.0.0";
|
2024-03-26 10:06:41 +00:00
|
|
|
pyproject = true;
|
2022-02-25 14:30:48 +00:00
|
|
|
|
2021-09-23 20:09:25 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
2018-02-26 12:45:52 +00:00
|
|
|
|
2021-09-23 20:09:25 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "kubernetes-client";
|
|
|
|
repo = "python";
|
2022-06-23 01:23:56 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-08 13:45:13 +00:00
|
|
|
hash = "sha256-KChfiXYnJTeIW6O7GaK/fMxU2quIvbjc4gB4aZBeTtI=";
|
2018-02-26 12:45:52 +00:00
|
|
|
};
|
|
|
|
|
2024-03-26 10:06:58 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace kubernetes/base/config/kube_config_test.py \
|
|
|
|
--replace-fail "assertEquals" "assertEqual"
|
|
|
|
'';
|
|
|
|
|
2024-03-26 10:06:41 +00:00
|
|
|
pythonRelaxDeps = [
|
|
|
|
"urllib3"
|
|
|
|
];
|
|
|
|
|
|
|
|
build-system = [
|
|
|
|
pythonRelaxDepsHook
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
2021-09-23 20:09:25 +00:00
|
|
|
certifi
|
|
|
|
google-auth
|
|
|
|
python-dateutil
|
|
|
|
pyyaml
|
|
|
|
requests
|
2022-02-25 14:30:48 +00:00
|
|
|
requests-oauthlib
|
2022-05-30 04:09:24 +00:00
|
|
|
six
|
2021-09-23 20:09:25 +00:00
|
|
|
urllib3
|
|
|
|
websocket-client
|
|
|
|
];
|
|
|
|
|
2024-03-26 10:06:41 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
adal = [
|
|
|
|
adal
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
2021-09-23 20:09:25 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"kubernetes"
|
|
|
|
];
|
|
|
|
|
2023-01-21 12:00:00 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-23 20:09:25 +00:00
|
|
|
mock
|
|
|
|
pytestCheckHook
|
2024-03-26 10:06:41 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
2018-02-26 12:45:52 +00:00
|
|
|
|
2022-04-02 02:09:37 +00:00
|
|
|
disabledTests = lib.optionals stdenv.isDarwin [
|
2022-03-18 03:25:40 +00:00
|
|
|
# AssertionError: <class 'urllib3.poolmanager.ProxyManager'> != <class 'urllib3.poolmanager.Poolmanager'>
|
|
|
|
"test_rest_proxycare"
|
|
|
|
];
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2022-02-25 14:30:48 +00:00
|
|
|
description = "Kubernetes Python client";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://github.com/kubernetes-client/python";
|
2024-03-26 09:54:21 +00:00
|
|
|
changelog = "https://github.com/kubernetes-client/python/releases/tag/v${version}";
|
2018-02-26 12:45:52 +00:00
|
|
|
license = licenses.asl20;
|
2023-07-23 17:30:22 +00:00
|
|
|
maintainers = with maintainers; [ lsix ];
|
2018-02-26 12:45:52 +00:00
|
|
|
};
|
|
|
|
}
|