3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/kubernetes/default.nix

40 lines
1.4 KiB
Nix
Raw Normal View History

{ stdenv, buildPythonPackage, fetchPypi, pythonAtLeast,
ipaddress, websocket_client, urllib3, pyyaml, requests_oauthlib, python-dateutil, google_auth, adal,
isort, pytest, coverage, mock, sphinx, autopep8, pep8, codecov, recommonmark, nose }:
buildPythonPackage rec {
pname = "kubernetes";
2020-06-06 07:47:16 +01:00
version = "11.0.0";
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 "");
doCheck = pythonAtLeast "3";
checkPhase = ''
2020-08-17 05:39:28 +01:00
py.test --ignore=kubernetes/dynamic/test_client.py
'';
src = fetchPypi {
inherit pname version;
2020-06-06 07:47:16 +01:00
sha256 = "1a2472f8b01bc6aa87e3a34781f859bded5a5c8ff791a53d889a8bd6cc550430";
};
checkInputs = [ isort coverage pytest mock sphinx autopep8 pep8 codecov recommonmark nose ];
propagatedBuildInputs = [ ipaddress websocket_client urllib3 pyyaml requests_oauthlib python-dateutil google_auth adal ];
meta = with stdenv.lib; {
description = "Kubernetes python client";
homepage = "https://github.com/kubernetes-client/python";
license = licenses.asl20;
maintainers = with maintainers; [ lsix ];
};
}