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