1{
2 lib,
3 buildPythonPackage,
4 fetchpatch,
5 fetchPypi,
6 fixtures,
7 hacking,
8 jsonschema,
9 openstacksdk,
10 oslotest,
11 python-glanceclient,
12 setuptools,
13 stestr,
14 subunit,
15 testscenarios,
16 testtools,
17}:
18
19buildPythonPackage rec {
20 pname = "os-client-config";
21 version = "2.1.0";
22 pyproject = true;
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-q8OKNR+MAG009+5fP2SN5ePs9kVcxdds/YidKRzfP04=";
27 };
28
29 patches = [
30 # Fix compatibility with openstacksdk 4.5.0
31 (fetchpatch {
32 url = "https://github.com/openstack/os-client-config/commit/46bc2deb4c6762dc1dd674686283eb3fa4c1d5e6.patch";
33 hash = "sha256-wZdwCbgrRg0mxs542zjWAlXn0PzCotlbZaEyinYKwb4=";
34 })
35 ];
36
37 build-system = [ setuptools ];
38
39 dependencies = [
40 openstacksdk
41 python-glanceclient
42 ];
43
44 nativeCheckInputs = [
45 hacking
46 fixtures
47 jsonschema
48 subunit
49 oslotest
50 stestr
51 testscenarios
52 testtools
53 ];
54
55 checkPhase = ''
56 runHook preCheck
57
58 stestr run
59
60 runHook postCheck
61 '';
62
63 pythonImportsCheck = [ "os_client_config" ];
64
65 meta = with lib; {
66 description = "Unified config handling for client libraries and programs";
67 homepage = "https://github.com/openstack/os-client-config";
68 license = licenses.asl20;
69 teams = [ teams.openstack ];
70 };
71}