1{ 2 lib, 3 buildPythonPackage, 4 cliff, 5 doc8, 6 docutils, 7 fetchPypi, 8 hacking, 9 keystoneauth1, 10 makePythonPath, 11 openstackdocstheme, 12 installer, 13 osc-lib, 14 oslotest, 15 oslo-serialization, 16 oslo-utils, 17 pbr, 18 pygments, 19 python-neutronclient, 20 python-openstackclient, 21 requests, 22 requests-mock, 23 setuptools, 24 sphinx, 25 sphinxcontrib-apidoc, 26 stestr, 27 subunit, 28 testscenarios, 29}: 30 31buildPythonPackage rec { 32 pname = "python-octaviaclient"; 33 version = "3.12.0"; 34 pyproject = true; 35 36 src = fetchPypi { 37 pname = "python_octaviaclient"; 38 inherit version; 39 hash = "sha256-5brfxkpJQousEcXl0YerzYDjrfl0XyWV0RXPTz146Y4="; 40 }; 41 42 # somehow python-neutronclient cannot be found despite it being supplied 43 pythonRemoveDeps = [ "python-neutronclient" ]; 44 45 build-system = [ 46 setuptools 47 pbr 48 ]; 49 50 nativeBuildInputs = [ 51 openstackdocstheme 52 sphinx 53 sphinxcontrib-apidoc 54 ]; 55 56 dependencies = [ 57 cliff 58 keystoneauth1 59 python-neutronclient 60 python-openstackclient 61 osc-lib 62 oslo-serialization 63 oslo-utils 64 requests 65 ]; 66 67 preInstall = '' 68 # TODO: I have really no idea why installer is missing... 69 export PYTHONPATH=$PYTHONPATH:${makePythonPath [ installer ]} 70 ''; 71 72 nativeCheckInputs = [ 73 hacking 74 requests-mock 75 doc8 76 docutils 77 pygments 78 subunit 79 oslotest 80 stestr 81 testscenarios 82 ]; 83 84 checkPhase = '' 85 runHook preCheck 86 87 # TODO: no idea why PYTHONPATH is broken here 88 export PYTHONPATH=$PYTHONPATH:${makePythonPath nativeCheckInputs} 89 90 stestr run 91 92 runHook postCheck 93 ''; 94 95 pythonImportsCheck = [ "octaviaclient" ]; 96 97 meta = with lib; { 98 description = "OpenStack Octavia Command-line Client"; 99 homepage = "https://github.com/openstack/python-octaviaclient"; 100 license = licenses.asl20; 101 teams = [ teams.openstack ]; 102 }; 103}