python39Packages.oslo-config: init at 8.7.1

This commit is contained in:
Sandro Jäckel 2021-09-11 12:11:59 +02:00
parent 13bf19d49b
commit 243294b2b4
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5
3 changed files with 102 additions and 0 deletions

View File

@ -0,0 +1,57 @@
{ lib
, buildPythonPackage
, fetchPypi
, debtcollector
, netaddr
, oslo-i18n
, pbr
, pyyaml
, requests
, rfc3986
, stevedore
, callPackage
}:
buildPythonPackage rec {
pname = "oslo-config";
version = "8.7.1";
src = fetchPypi {
pname = "oslo.config";
inherit version;
sha256 = "a0c346d778cdc8870ab945e438bea251b5f45fae05d6d99dfe4953cca2277b60";
};
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
'';
propagatedBuildInputs = [
debtcollector
netaddr
oslo-i18n
pbr
pyyaml
requests
rfc3986
stevedore
];
# check in passthru.tests.pytest to escape infinite recursion with other oslo components
doCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix {};
};
pythonImportsCheck = [ "oslo_config" ];
meta = with lib; {
description = "Oslo Configuration API";
homepage = "https://github.com/openstack/oslo.config";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}

View File

@ -0,0 +1,43 @@
{ stdenv
, buildPythonPackage
, oslo-config
, docutils
, oslo-log
, oslotest
, requests-mock
, sphinx
, stestr
, testscenarios
}:
buildPythonPackage rec {
pname = "oslo-config-tests";
inherit (oslo-config) version;
src = oslo-config.src;
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
'';
dontBuild = true;
dontInstall = true;
checkInputs = [
oslo-config
docutils
oslo-log
oslotest
requests-mock
sphinx
stestr
testscenarios
];
checkPhase = ''
stestr run
'';
}

View File

@ -5156,6 +5156,8 @@ in {
oslo-concurrency = callPackage ../development/python-modules/oslo-concurrency { };
oslo-config = callPackage ../development/python-modules/oslo-config { };
osqp = callPackage ../development/python-modules/osqp { };
outcome = callPackage ../development/python-modules/outcome { };