1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 installShellFiles,
6 pbr,
7 openstackdocstheme,
8 oslo-config,
9 oslo-log,
10 oslo-serialization,
11 oslo-utils,
12 prettytable,
13 requests,
14 simplejson,
15 sphinx,
16 sphinxcontrib-programoutput,
17 babel,
18 osc-lib,
19 python-keystoneclient,
20 debtcollector,
21 callPackage,
22}:
23
24buildPythonPackage rec {
25 pname = "python-manilaclient";
26 version = "4.9.0";
27 format = "setuptools";
28
29 src = fetchPypi {
30 inherit pname version;
31 hash = "sha256-Q7ADjuGQh5C88WqT5II+NMYLYFwTip/bzZinca/xqFY=";
32 };
33
34 nativeBuildInputs = [
35 installShellFiles
36 openstackdocstheme
37 sphinx
38 sphinxcontrib-programoutput
39 ];
40
41 propagatedBuildInputs = [
42 pbr
43 oslo-config
44 oslo-log
45 oslo-serialization
46 oslo-utils
47 prettytable
48 requests
49 simplejson
50 babel
51 osc-lib
52 python-keystoneclient
53 debtcollector
54 ];
55
56 postInstall = ''
57 export PATH=$out/bin:$PATH
58 sphinx-build -a -E -d doc/build/doctrees -b man doc/source doc/build/man
59 installManPage doc/build/man/python-manilaclient.1
60 '';
61
62 # Checks moved to 'passthru.tests' to workaround infinite recursion
63 doCheck = false;
64
65 passthru.tests = {
66 tests = callPackage ./tests.nix { };
67 };
68
69 pythonImportsCheck = [ "manilaclient" ];
70
71 meta = with lib; {
72 description = "Client library for OpenStack Manila API";
73 mainProgram = "manila";
74 homepage = "https://github.com/openstack/python-manilaclient";
75 license = licenses.asl20;
76 maintainers = teams.openstack.members;
77 };
78}