1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 debtcollector,
6 netaddr,
7 oslo-i18n,
8 pbr,
9 pyyaml,
10 requests,
11 rfc3986,
12 stevedore,
13 callPackage,
14}:
15
16buildPythonPackage rec {
17 pname = "oslo-config";
18 version = "9.4.0";
19 format = "setuptools";
20
21 src = fetchPypi {
22 pname = "oslo.config";
23 inherit version;
24 hash = "sha256-NbEaZhtgjttQMF2tkeTjCBnZDveUt9fbpb2LLvLrjA0=";
25 };
26
27 postPatch = ''
28 # only a small portion of the listed packages are actually needed for running the tests
29 # so instead of removing them one by one remove everything
30 rm test-requirements.txt
31 '';
32
33 propagatedBuildInputs = [
34 debtcollector
35 netaddr
36 oslo-i18n
37 pbr
38 pyyaml
39 requests
40 rfc3986
41 stevedore
42 ];
43
44 # check in passthru.tests.pytest to escape infinite recursion with other oslo components
45 doCheck = false;
46
47 passthru.tests = {
48 tests = callPackage ./tests.nix { };
49 };
50
51 pythonImportsCheck = [ "oslo_config" ];
52
53 meta = with lib; {
54 description = "Oslo Configuration API";
55 homepage = "https://github.com/openstack/oslo.config";
56 license = licenses.asl20;
57 maintainers = teams.openstack.members;
58 };
59}