1{
2 lib,
3 buildPythonPackage,
4 cryptography,
5 decorator,
6 fetchFromGitHub,
7 fixtures,
8 keystoneauth1,
9 openstackdocstheme,
10 os-client-config,
11 osc-lib,
12 oslo-i18n,
13 oslo-log,
14 oslo-serialization,
15 oslo-utils,
16 oslotest,
17 osprofiler,
18 pbr,
19 prettytable,
20 python-openstackclient,
21 pythonOlder,
22 requests-mock,
23 requests,
24 setuptools,
25 sphinxHook,
26 stestr,
27 stevedore,
28 testtools,
29}:
30
31buildPythonPackage rec {
32 pname = "python-magnumclient";
33 version = "4.8.1";
34 pyproject = true;
35
36 disabled = pythonOlder "3.8";
37
38 src = fetchFromGitHub {
39 owner = "openstack";
40 repo = "python-magnumclient";
41 tag = version;
42 hash = "sha256-rXLJnvGc5VHkHghCoBLRhARwl3hhS/oI2VOsGWfESkM=";
43 };
44
45 env.PBR_VERSION = version;
46
47 nativeBuildInputs = [
48 openstackdocstheme
49 sphinxHook
50 ];
51
52 sphinxBuilders = [ "man" ];
53
54 build-system = [
55 pbr
56 setuptools
57 ];
58
59 dependencies = [
60 cryptography
61 decorator
62 keystoneauth1
63 os-client-config
64 osc-lib
65 oslo-i18n
66 oslo-log
67 oslo-serialization
68 oslo-utils
69 prettytable
70 requests
71 stevedore
72 ];
73
74 nativeCheckInputs = [
75 fixtures
76 python-openstackclient
77 osprofiler
78 oslotest
79 requests-mock
80 stestr
81 testtools
82 ];
83
84 checkPhase = ''
85 runHook preCheck
86 stestr run
87 runHook postCheck
88 '';
89
90 pythonImportsCheck = [ "magnumclient" ];
91
92 meta = {
93 homepage = "https://github.com/openstack/python-magnumclient";
94 description = "Client library for OpenStack Magnum API";
95 license = lib.licenses.asl20;
96 mainProgram = "magnum";
97 teams = [ lib.teams.openstack ];
98 };
99}