2021-01-25 08:26:54 +00:00
|
|
|
{ lib, buildPythonPackage, fetchPypi, pythonAtLeast,
|
2021-01-06 09:46:48 +00:00
|
|
|
ipaddress, websocket_client, urllib3, pyyaml, requests_oauthlib, python-dateutil, google-auth, adal,
|
2018-02-26 12:45:52 +00:00
|
|
|
isort, pytest, coverage, mock, sphinx, autopep8, pep8, codecov, recommonmark, nose }:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "kubernetes";
|
2020-11-29 14:04:32 +00:00
|
|
|
version = "12.0.1";
|
2018-02-26 12:45:52 +00:00
|
|
|
|
|
|
|
prePatch = ''
|
|
|
|
sed -e 's/sphinx>=1.2.1,!=1.3b1,<1.4 # BSD/sphinx/' -i test-requirements.txt
|
|
|
|
|
|
|
|
# This is used to randomize tests, which is not reproducible. Drop it.
|
|
|
|
sed -e '/randomize/d' -i test-requirements.txt
|
|
|
|
''
|
|
|
|
# This is a python2 and python3.2 only requiremet since it is a backport of a python-3.3 api.
|
|
|
|
+ (if (pythonAtLeast "3.3") then ''
|
|
|
|
sed -e '/ipaddress/d' -i requirements.txt
|
|
|
|
'' else "");
|
|
|
|
|
2020-03-18 22:36:13 +00:00
|
|
|
doCheck = pythonAtLeast "3";
|
2018-02-26 12:45:52 +00:00
|
|
|
checkPhase = ''
|
2020-08-17 05:39:28 +01:00
|
|
|
py.test --ignore=kubernetes/dynamic/test_client.py
|
2018-02-26 12:45:52 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2020-11-29 14:04:32 +00:00
|
|
|
sha256 = "ec52ea01d52e2ec3da255992f7e859f3a76f2bdb51cf65ba8cd71dfc309d8daa";
|
2018-02-26 12:45:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
checkInputs = [ isort coverage pytest mock sphinx autopep8 pep8 codecov recommonmark nose ];
|
2021-01-06 09:46:48 +00:00
|
|
|
propagatedBuildInputs = [ ipaddress websocket_client urllib3 pyyaml requests_oauthlib python-dateutil google-auth adal ];
|
2018-02-26 12:45:52 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-02-26 12:45:52 +00:00
|
|
|
description = "Kubernetes python client";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/kubernetes-client/python";
|
2018-02-26 12:45:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = with maintainers; [ lsix ];
|
|
|
|
};
|
|
|
|
}
|