Merge pull request #299146 from fabaff/kubernetes-fix
python312Packages.kubernetes: fix test failure
This commit is contained in:
commit
508b6d712b
|
@ -1,14 +1,15 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenv
|
, stdenv
|
||||||
, buildPythonPackage
|
|
||||||
, fetchFromGitHub
|
|
||||||
, pythonOlder
|
|
||||||
|
|
||||||
# propgatedBuildInputs
|
|
||||||
, adal
|
, adal
|
||||||
|
, buildPythonPackage
|
||||||
, certifi
|
, certifi
|
||||||
|
, fetchFromGitHub
|
||||||
, google-auth
|
, google-auth
|
||||||
|
, mock
|
||||||
|
, pytestCheckHook
|
||||||
, python-dateutil
|
, python-dateutil
|
||||||
|
, pythonOlder
|
||||||
|
, pythonRelaxDepsHook
|
||||||
, pyyaml
|
, pyyaml
|
||||||
, requests
|
, requests
|
||||||
, requests-oauthlib
|
, requests-oauthlib
|
||||||
|
@ -16,16 +17,12 @@
|
||||||
, six
|
, six
|
||||||
, urllib3
|
, urllib3
|
||||||
, websocket-client
|
, websocket-client
|
||||||
|
|
||||||
# tests
|
|
||||||
, pytestCheckHook
|
|
||||||
, mock
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "kubernetes";
|
pname = "kubernetes";
|
||||||
version = "28.1.0";
|
version = "28.1.0";
|
||||||
format = "setuptools";
|
pyproject = true;
|
||||||
|
|
||||||
disabled = pythonOlder "3.6";
|
disabled = pythonOlder "3.6";
|
||||||
|
|
||||||
|
@ -36,20 +33,38 @@ buildPythonPackage rec {
|
||||||
hash = "sha256-NKrxv5a5gkgpNG7yViTKYBYnU249taWl6fkPJa7/Rzo=";
|
hash = "sha256-NKrxv5a5gkgpNG7yViTKYBYnU249taWl6fkPJa7/Rzo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
postPatch = ''
|
||||||
adal
|
substituteInPlace kubernetes/base/config/kube_config_test.py \
|
||||||
|
--replace-fail "assertEquals" "assertEqual"
|
||||||
|
'';
|
||||||
|
|
||||||
|
pythonRelaxDeps = [
|
||||||
|
"urllib3"
|
||||||
|
];
|
||||||
|
|
||||||
|
build-system = [
|
||||||
|
pythonRelaxDepsHook
|
||||||
|
setuptools
|
||||||
|
];
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
certifi
|
certifi
|
||||||
google-auth
|
google-auth
|
||||||
python-dateutil
|
python-dateutil
|
||||||
pyyaml
|
pyyaml
|
||||||
requests
|
requests
|
||||||
requests-oauthlib
|
requests-oauthlib
|
||||||
setuptools
|
|
||||||
six
|
six
|
||||||
urllib3
|
urllib3
|
||||||
websocket-client
|
websocket-client
|
||||||
];
|
];
|
||||||
|
|
||||||
|
passthru.optional-dependencies = {
|
||||||
|
adal = [
|
||||||
|
adal
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [
|
||||||
"kubernetes"
|
"kubernetes"
|
||||||
];
|
];
|
||||||
|
@ -57,7 +72,7 @@ buildPythonPackage rec {
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [
|
||||||
mock
|
mock
|
||||||
pytestCheckHook
|
pytestCheckHook
|
||||||
];
|
] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
|
||||||
|
|
||||||
disabledTests = lib.optionals stdenv.isDarwin [
|
disabledTests = lib.optionals stdenv.isDarwin [
|
||||||
# AssertionError: <class 'urllib3.poolmanager.ProxyManager'> != <class 'urllib3.poolmanager.Poolmanager'>
|
# AssertionError: <class 'urllib3.poolmanager.ProxyManager'> != <class 'urllib3.poolmanager.Poolmanager'>
|
||||||
|
@ -67,6 +82,7 @@ buildPythonPackage rec {
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Kubernetes Python client";
|
description = "Kubernetes Python client";
|
||||||
homepage = "https://github.com/kubernetes-client/python";
|
homepage = "https://github.com/kubernetes-client/python";
|
||||||
|
changelog = "https://github.com/kubernetes-client/python/releases/tag/v${version}";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
maintainers = with maintainers; [ lsix ];
|
maintainers = with maintainers; [ lsix ];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user