1{ stdenv, buildPythonPackage, fetchPypi, pythonAtLeast,
2 ipaddress, websocket_client, urllib3, pyyaml, requests_oauthlib, python-dateutil, google_auth, adal,
3 isort, pytest, coverage, mock, sphinx, autopep8, pep8, codecov, recommonmark, nose }:
4
5buildPythonPackage rec {
6 pname = "kubernetes";
7 version = "11.0.0";
8
9 prePatch = ''
10 sed -e 's/sphinx>=1.2.1,!=1.3b1,<1.4 # BSD/sphinx/' -i test-requirements.txt
11
12 # This is used to randomize tests, which is not reproducible. Drop it.
13 sed -e '/randomize/d' -i test-requirements.txt
14 ''
15 # This is a python2 and python3.2 only requiremet since it is a backport of a python-3.3 api.
16 + (if (pythonAtLeast "3.3") then ''
17 sed -e '/ipaddress/d' -i requirements.txt
18 '' else "");
19
20 doCheck = pythonAtLeast "3";
21 checkPhase = ''
22 py.test --ignore=kubernetes/dynamic/test_client.py
23 '';
24
25 src = fetchPypi {
26 inherit pname version;
27 sha256 = "1a2472f8b01bc6aa87e3a34781f859bded5a5c8ff791a53d889a8bd6cc550430";
28 };
29
30 checkInputs = [ isort coverage pytest mock sphinx autopep8 pep8 codecov recommonmark nose ];
31 propagatedBuildInputs = [ ipaddress websocket_client urllib3 pyyaml requests_oauthlib python-dateutil google_auth adal ];
32
33 meta = with stdenv.lib; {
34 description = "Kubernetes python client";
35 homepage = "https://github.com/kubernetes-client/python";
36 license = licenses.asl20;
37 maintainers = with maintainers; [ lsix ];
38 };
39}