2021-09-18 10:52:07 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, ddt
|
|
|
|
, debtcollector
|
|
|
|
, eventlet
|
|
|
|
, fixtures
|
|
|
|
, iso8601
|
|
|
|
, netaddr
|
|
|
|
, netifaces
|
|
|
|
, oslo-i18n
|
|
|
|
, oslotest
|
|
|
|
, packaging
|
|
|
|
, pbr
|
|
|
|
, pyparsing
|
|
|
|
, pytz
|
|
|
|
, stestr
|
|
|
|
, testscenarios
|
|
|
|
, pyyaml
|
|
|
|
, iana-etc
|
|
|
|
, libredirect
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "oslo-utils";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "6.2.1";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2021-09-18 10:52:07 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
pname = "oslo.utils";
|
|
|
|
inherit version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-EyK6BfoP88Gor8cn/PlF31qoLWWEcn0uBK8Di1roQkQ=";
|
2021-09-18 10:52:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# only a small portion of the listed packages are actually needed for running the tests
|
|
|
|
# so instead of removing them one by one remove everything
|
|
|
|
rm test-requirements.txt
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ pbr ];
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
debtcollector
|
|
|
|
iso8601
|
|
|
|
netaddr
|
|
|
|
netifaces
|
|
|
|
oslo-i18n
|
|
|
|
packaging
|
|
|
|
pyparsing
|
|
|
|
pytz
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-09-18 10:52:07 +00:00
|
|
|
ddt
|
|
|
|
eventlet
|
|
|
|
fixtures
|
|
|
|
oslotest
|
|
|
|
stestr
|
|
|
|
testscenarios
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
echo "nameserver 127.0.0.1" > resolv.conf
|
|
|
|
export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf)
|
|
|
|
export LD_PRELOAD=${libredirect}/lib/libredirect.so
|
|
|
|
|
|
|
|
stestr run
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "oslo_utils" ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Oslo Utility library";
|
|
|
|
homepage = "https://github.com/openstack/oslo.utils";
|
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = teams.openstack.members;
|
|
|
|
};
|
|
|
|
}
|