5083ee08a2
GitOrigin-RevId: 10ecda252ce1b3b1d6403caeadbcc8f30d5ab796
79 lines
1.4 KiB
Nix
79 lines
1.4 KiB
Nix
{ 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";
|
|
version = "6.0.1";
|
|
|
|
src = fetchPypi {
|
|
pname = "oslo.utils";
|
|
inherit version;
|
|
sha256 = "sha256-mwRU+ZQV0MqsXIYFNxbXRtGY7Oxm5nLY5eY4a2+6orY=";
|
|
};
|
|
|
|
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
|
|
];
|
|
|
|
checkInputs = [
|
|
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;
|
|
};
|
|
}
|