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