about summary refs log tree commit diff
path: root/pkgs/development/python-modules/kubernetes/default.nix
diff options
context:
space:
mode:
authorTuomas Tynkkynen <tuomas@tuxera.com>2018-02-28 20:52:49 +0200
committerTuomas Tynkkynen <tuomas@tuxera.com>2018-02-28 20:52:49 +0200
commit34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852 (patch)
treed3e3546a41a812d151d1980cb8ee6808a8b8c7c6 /pkgs/development/python-modules/kubernetes/default.nix
parentad17db3562766979371f0ae9cc0d2428f44a9d58 (diff)
parentf1dd205c4e5ac28931ae8cdcde9d3c9a8ed2a0f5 (diff)
downloadnixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar
nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.gz
nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.bz2
nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.lz
nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.xz
nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.zst
nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.zip
Merge remote-tracking branch 'upstream/master' into staging
Conflicts:
	pkgs/applications/misc/pytrainer/default.nix
	pkgs/development/tools/pew/default.nix
	pkgs/tools/misc/you-get/default.nix
Diffstat (limited to 'pkgs/development/python-modules/kubernetes/default.nix')
-rw-r--r--pkgs/development/python-modules/kubernetes/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/kubernetes/default.nix b/pkgs/development/python-modules/kubernetes/default.nix
new file mode 100644
index 000000000000..5566eea64eb8
--- /dev/null
+++ b/pkgs/development/python-modules/kubernetes/default.nix
@@ -0,0 +1,38 @@
+{ stdenv, buildPythonPackage, fetchPypi, pythonAtLeast,
+  ipaddress, websocket_client, urllib3, pyyaml, requests_oauthlib, python-dateutil, google_auth,
+  isort, pytest, coverage, mock, sphinx, autopep8, pep8, codecov, recommonmark, nose }:
+
+buildPythonPackage rec {
+  pname = "kubernetes";
+  version = "5.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 "");
+
+  checkPhase = ''
+    py.test
+  '';
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "1z8rrlq73bzli9rg57kj8ivz09vhsydyjq1ksbcis6j7h9c187zq";
+  };
+
+  checkInputs = [ isort coverage pytest mock sphinx autopep8 pep8 codecov recommonmark nose ];
+  propagatedBuildInputs = [ ipaddress websocket_client urllib3 pyyaml requests_oauthlib python-dateutil google_auth ];
+
+  meta = with stdenv.lib; {
+    description = "Kubernetes python client";
+    homepage = https://github.com/kubernetes-client/python;
+    license = licenses.asl20;
+    maintainers = with maintainers; [ lsix ];
+  };
+}