evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / oslo-utils / default.nix
blob578e2dfdbf9a77f445896de2d2430551c387a079
2   lib,
3   buildPythonPackage,
4   fetchPypi,
5   ddt,
6   debtcollector,
7   eventlet,
8   fixtures,
9   iso8601,
10   netaddr,
11   netifaces,
12   oslo-i18n,
13   oslotest,
14   packaging,
15   pbr,
16   pyparsing,
17   pytz,
18   qemu-utils,
19   setuptools,
20   stestr,
21   testscenarios,
22   tzdata,
23   pyyaml,
24   iana-etc,
25   libredirect,
28 buildPythonPackage rec {
29   pname = "oslo-utils";
30   version = "7.3.0";
31   pyproject = true;
33   src = fetchPypi {
34     pname = "oslo.utils";
35     inherit version;
36     hash = "sha256-WaXT5Oe7x42AHM68K4I+QptiTBK7bjtudvccKfK/Id8=";
37   };
39   postPatch = ''
40     # only a small portion of the listed packages are actually needed for running the tests
41     # so instead of removing them one by one remove everything
42     rm test-requirements.txt
43   '';
45   nativeBuildInputs = [
46     pbr
47     setuptools
48   ];
50   propagatedBuildInputs = [
51     debtcollector
52     iso8601
53     netaddr
54     netifaces
55     oslo-i18n
56     packaging
57     pyparsing
58     pytz
59     tzdata
60   ];
62   nativeCheckInputs = [
63     ddt
64     eventlet
65     fixtures
66     oslotest
67     qemu-utils
68     stestr
69     testscenarios
70     pyyaml
71   ];
73   # disabled tests:
74   # https://bugs.launchpad.net/oslo.utils/+bug/2054134
75   # netaddr default behaviour changed to be stricter
76   checkPhase = ''
77     echo "nameserver 127.0.0.1" > resolv.conf
78     export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf)
79     export LD_PRELOAD=${libredirect}/lib/libredirect.so
81     stestr run -e <(echo "
82       oslo_utils.tests.test_netutils.NetworkUtilsTest.test_is_valid_ip
83       oslo_utils.tests.test_netutils.NetworkUtilsTest.test_is_valid_ipv4
84     ")
85   '';
87   pythonImportsCheck = [ "oslo_utils" ];
89   meta = with lib; {
90     description = "Oslo Utility library";
91     homepage = "https://github.com/openstack/oslo.utils";
92     license = licenses.asl20;
93     maintainers = teams.openstack.members;
94   };