From b02d4a38d9611ee99fd20aa9fddc6dbfcc555d6c Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 20 Apr 2021 16:44:07 +0200 Subject: [PATCH] python3Packages.openshift: init at 0.12.0 it is used in the kubernetes ansible module Apply suggestions from code review Co-authored-by: Sandro --- .../python-modules/openshift/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/openshift/default.nix diff --git a/pkgs/development/python-modules/openshift/default.nix b/pkgs/development/python-modules/openshift/default.nix new file mode 100644 index 000000000000..052d364982b3 --- /dev/null +++ b/pkgs/development/python-modules/openshift/default.nix @@ -0,0 +1,39 @@ +{ + lib + , buildPythonPackage + , fetchPypi + , jinja2 + , kubernetes + , ruamel-yaml + , six + , python-string-utils +}: + +buildPythonPackage rec { + pname = "openshift"; + version = "0.12.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "sha256-aggRnD4goiZJPp4cngp8AIrJC/V46378cwUSfq8Xml4="; + }; + + propagatedBuildInputs = [ + jinja2 + kubernetes + python-string-utils + ruamel-yaml + six + ]; + + # tries to connect to the network + doCheck = false; + pythonImportsCheck = ["openshift"]; + + meta = with lib; { + description = "Python client for the OpenShift API"; + homepage = "https://github.com/openshift/openshift-restclient-python"; + license = licenses.asl20; + maintainers = with maintainers; [ teto ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 3e02d8460294..439d4d8e4a5c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -4624,6 +4624,8 @@ in { opensensemap-api = callPackage ../development/python-modules/opensensemap-api { }; + openshift = callPackage ../development/python-modules/openshift { }; + opentimestamps = callPackage ../development/python-modules/opentimestamps { }; opentracing = callPackage ../development/python-modules/opentracing { };