git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #35668 from lsix/add_pythonPackages_kubernetes

pythonPackages.kubernetes: init at 5.0.0

commit62f0942b6eb557ec6a205a8680814f276e10e229 authorFrederik Rietdijk <freddyrietdijk@fridh.nl> dateTue 27 Feb 2018, 15:51 (9 years ago) parent326522695d59d4
3 files changed+65−16
pkgs/development/python-modules/kubernetes/default.nix+38 pkgs/development/python-modules/websockets_client/default.nix+24 pkgs/top-level/python-packages.nix+3−16
pkgs/development/python-modules/kubernetes/default.nixnew file+38
@@ -0,0 +1,38 @@
1+{ stdenv, buildPythonPackage, fetchPypi, pythonAtLeast,
2+ ipaddress, websocket_client, urllib3, pyyaml, requests_oauthlib, python-dateutil, google_auth,
3+ isort, pytest, coverage, mock, sphinx, autopep8, pep8, codecov, recommonmark, nose }:
4+
5+buildPythonPackage rec {
6+ pname = "kubernetes";
7+ version = "5.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+ checkPhase = ''
21+ py.test
22+ '';
23+
24+ src = fetchPypi {
25+ inherit pname version;
26+ sha256 = "1z8rrlq73bzli9rg57kj8ivz09vhsydyjq1ksbcis6j7h9c187zq";
27+ };
28+
29+ checkInputs = [ isort coverage pytest mock sphinx autopep8 pep8 codecov recommonmark nose ];
30+ propagatedBuildInputs = [ ipaddress websocket_client urllib3 pyyaml requests_oauthlib python-dateutil google_auth ];
31+
32+ meta = with stdenv.lib; {
33+ description = "Kubernetes python client";
34+ homepage = https://github.com/kubernetes-client/python;
35+ license = licenses.asl20;
36+ maintainers = with maintainers; [ lsix ];
37+ };
38+}
pkgs/development/python-modules/websockets_client/default.nixnew file+24
@@ -0,0 +1,24 @@
1+{ stdenv, buildPythonPackage, fetchPypi, six }:
2+buildPythonPackage rec {
3+ pname = "websocket_client";
4+ version = "0.47.0";
5+
6+ src = fetchPypi {
7+ inherit version pname;
8+ sha256 = "0jb1446053ryp5p25wsr1hjfdzwfm04a6f3pzpcb63bfz96xqlx4";
9+ };
10+
11+ prePatch = ''
12+ # ssl.match_hostname exists in python2.7 version maintained in nixpkgs,
13+ # the dependency is not necessary.
14+ sed -e "s/\['backports.ssl_match_hostname'\]/\[\]/" -i setup.py
15+ '';
16+
17+ propagatedBuildInputs = [ six ];
18+
19+ meta = with stdenv.lib; {
20+ homepage = https://github.com/liris/websocket-client;
21+ description = "Websocket client for python";
22+ license = licenses.lgpl2;
23+ };
24+}
pkgs/top-level/python-packages.nix+3−16
@@ -9268,6 +9268,8 @@ in {
92689268
92699269 kitchen = callPackage ../development/python-modules/kitchen/default.nix { };
92709270
9271+ kubernetes = callPackage ../development/python-modules/kubernetes/default.nix { };
9272+
92719273 pylast = callPackage ../development/python-modules/pylast/default.nix { };
92729274
92739275 pylru = callPackage ../development/python-modules/pylru/default.nix { };
@@ -18683,22 +18685,7 @@ EOF
1868318685 };
1868418686
1868518687
18686− websocket_client = buildPythonPackage rec {
18687− name = "websocket_client-0.40.0";
18688−
18689− src = pkgs.fetchurl {
18690− url = "mirror://pypi/w/websocket-client/${name}.tar.gz";
18691− sha256 = "1yz67wdjijrvwpx0a0f6wdfy8ajsvr9xbj5514ld452fqnh19b20";
18692− };
18693−
18694− propagatedBuildInputs = with self; [ six backports_ssl_match_hostname unittest2 argparse ];
18695−
18696− meta = {
18697− homepage = https://github.com/liris/websocket-client;
18698− description = "Websocket client for python";
18699− license = licenses.lgpl2;
18700− };
18701− };
18688+ websocket_client = callPackage ../development/python-modules/websockets_client { };
1870218689
1870318690
1870418691 webhelpers = buildPythonPackage rec {