nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 ddt,
6 keystoneauth1,
7 openstackdocstheme,
8 oslo-i18n,
9 oslo-serialization,
10 oslo-utils,
11 pbr,
12 requests,
13 prettytable,
14 reno,
15 requests-mock,
16 setuptools,
17 simplejson,
18 sphinxHook,
19 stestr,
20 stevedore,
21}:
22
23buildPythonPackage rec {
24 pname = "python-cinderclient";
25 version = "9.8.0";
26 pyproject = true;
27
28 src = fetchPypi {
29 pname = "python_cinderclient";
30 inherit version;
31 hash = "sha256-vT7p+Uh8XnmVfwGKaz8t7OcFna2PYVXYPdS265RHoR0=";
32 };
33
34 nativeBuildInputs = [
35 openstackdocstheme
36 reno
37 sphinxHook
38 ];
39
40 sphinxBuilders = [ "man" ];
41
42 build-system = [ setuptools ];
43
44 dependencies = [
45 simplejson
46 keystoneauth1
47 oslo-i18n
48 oslo-utils
49 pbr
50 prettytable
51 requests
52 stevedore
53 ];
54
55 nativeCheckInputs = [
56 ddt
57 oslo-serialization
58 requests-mock
59 stestr
60 ];
61
62 checkPhase = ''
63 runHook preCheck
64
65 # File "/build/python-cinderclient-9.6.0/cinderclient/client.py", line 196, in request
66 # if raise_exc and resp.status_code >= 400:
67 # ^^^^^^^^^^^^^^^^^^^^^^^
68 #
69 # TypeError: '>=' not supported between instances of 'Mock' and 'int'
70 stestr run -e <(echo "
71 cinderclient.tests.unit.test_client.ClientTest.test_keystone_request_raises_auth_failure_exception
72 cinderclient.tests.unit.test_client.ClientTest.test_sessionclient_request_method
73 cinderclient.tests.unit.test_client.ClientTest.test_sessionclient_request_method_raises_badrequest
74 cinderclient.tests.unit.test_client.ClientTest.test_sessionclient_request_method_raises_overlimit
75 cinderclient.tests.unit.test_shell.ShellTest.test_password_prompted
76 cinderclient.tests.unit.test_shell.TestLoadVersionedActions.test_load_versioned_actions_with_help
77 ")
78
79 runHook postCheck
80 '';
81
82 pythonImportsCheck = [ "cinderclient" ];
83
84 meta = {
85 description = "OpenStack Block Storage API Client Library";
86 mainProgram = "cinder";
87 homepage = "https://github.com/openstack/python-cinderclient";
88 license = lib.licenses.asl20;
89 teams = [ lib.teams.openstack ];
90 };
91}