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