From eaa94b29ee9d2af6da612719e7f851d5f781b1f7 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Mon, 26 Feb 2018 13:04:46 +0100 Subject: [PATCH 1/2] pythonPackages.websocket_client: 0.40.0 -> 0.47.0 --- .../websockets_client/default.nix | 24 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 17 +------------ 2 files changed, 25 insertions(+), 16 deletions(-) create mode 100644 pkgs/development/python-modules/websockets_client/default.nix diff --git a/pkgs/development/python-modules/websockets_client/default.nix b/pkgs/development/python-modules/websockets_client/default.nix new file mode 100644 index 000000000000..dd6e9200db52 --- /dev/null +++ b/pkgs/development/python-modules/websockets_client/default.nix @@ -0,0 +1,24 @@ +{ stdenv, buildPythonPackage, fetchPypi, six }: +buildPythonPackage rec { + pname = "websocket_client"; + version = "0.47.0"; + + src = fetchPypi { + inherit version pname; + sha256 = "0jb1446053ryp5p25wsr1hjfdzwfm04a6f3pzpcb63bfz96xqlx4"; + }; + + prePatch = '' + # ssl.match_hostname exists in python2.7 version maintained in nixpkgs, + # the dependency is not necessary. + sed -e "s/\['backports.ssl_match_hostname'\]/\[\]/" -i setup.py + ''; + + propagatedBuildInputs = [ six ]; + + meta = with stdenv.lib; { + homepage = https://github.com/liris/websocket-client; + description = "Websocket client for python"; + license = licenses.lgpl2; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d05c172ed38c..7ef5452863cb 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -18590,22 +18590,7 @@ EOF }; - websocket_client = buildPythonPackage rec { - name = "websocket_client-0.40.0"; - - src = pkgs.fetchurl { - url = "mirror://pypi/w/websocket-client/${name}.tar.gz"; - sha256 = "1yz67wdjijrvwpx0a0f6wdfy8ajsvr9xbj5514ld452fqnh19b20"; - }; - - propagatedBuildInputs = with self; [ six backports_ssl_match_hostname unittest2 argparse ]; - - meta = { - homepage = https://github.com/liris/websocket-client; - description = "Websocket client for python"; - license = licenses.lgpl2; - }; - }; + websocket_client = callPackage ../development/python-modules/websockets_client { }; webhelpers = buildPythonPackage rec { From 95d59d42332f5d1276c8b02e20da12a8505c0de6 Mon Sep 17 00:00:00 2001 From: Lancelot SIX Date: Mon, 26 Feb 2018 13:45:52 +0100 Subject: [PATCH 2/2] pythonPackages.kubernetes: init at 5.0.0 --- .../python-modules/kubernetes/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/kubernetes/default.nix 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 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7ef5452863cb..5d64e4768915 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -9202,6 +9202,8 @@ in { kitchen = callPackage ../development/python-modules/kitchen/default.nix { }; + kubernetes = callPackage ../development/python-modules/kubernetes/default.nix { }; + pylast = callPackage ../development/python-modules/pylast/default.nix { }; pylru = callPackage ../development/python-modules/pylru/default.nix { };