1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, jinja2 5, kubernetes 6, ruamel-yaml 7, six 8, python-string-utils 9, pytest-bdd 10, pytestCheckHook 11}: 12 13buildPythonPackage rec { 14 pname = "openshift"; 15 version = "0.13.2"; 16 17 src = fetchFromGitHub { 18 owner = "openshift"; 19 repo = "openshift-restclient-python"; 20 rev = "refs/tags/v${version}"; 21 hash = "sha256-uLfewj7M8KNs3oL1AM18sR/WhAR2mvBfqadyhR73FP0="; 22 }; 23 24 postPatch = '' 25 substituteInPlace requirements.txt \ 26 --replace "kubernetes ~= 12.0" "kubernetes" 27 28 sed -i '/--cov/d' setup.cfg 29 ''; 30 31 propagatedBuildInputs = [ 32 jinja2 33 kubernetes 34 python-string-utils 35 ruamel-yaml 36 six 37 ]; 38 39 pythonImportsCheck = ["openshift"]; 40 41 nativeCheckInputs = [ 42 pytest-bdd 43 pytestCheckHook 44 ]; 45 46 disabledTestPaths = [ 47 # requires kubeconfig 48 "test/integration" 49 ]; 50 51 meta = with lib; { 52 description = "Python client for the OpenShift API"; 53 homepage = "https://github.com/openshift/openshift-restclient-python"; 54 license = licenses.asl20; 55 maintainers = with maintainers; [ teto ]; 56 }; 57}