Merge pull request #137566 from SuperSandro2000/pbr

This commit is contained in:
Sandro
2021-09-14 15:09:37 +02:00
committed by GitHub
7 changed files with 69 additions and 9 deletions
@@ -17,7 +17,7 @@ buildPythonPackage rec {
doCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix { };
tests = callPackage ./tests.nix { };
};
pythonImportsCheck = [ "debtcollector" ];
@@ -27,7 +27,7 @@ buildPythonPackage rec {
doCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix { };
tests = callPackage ./tests.nix { };
};
pythonImportsCheck = [ "os_service_types" ];
@@ -43,7 +43,7 @@ buildPythonPackage rec {
doCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix {};
tests = callPackage ./tests.nix {};
};
pythonImportsCheck = [ "oslo_config" ];
@@ -27,7 +27,7 @@ buildPythonPackage rec {
doCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix {};
tests = callPackage ./tests.nix {};
};
pythonImportsCheck = [ "oslotest" ];
@@ -1,4 +1,9 @@
{ lib, buildPythonPackage, fetchPypi, setuptools }:
{ lib
, buildPythonPackage
, fetchPypi
, setuptools
, callPackage
}:
buildPythonPackage rec {
pname = "pbr";
@@ -11,13 +16,19 @@ buildPythonPackage rec {
propagatedBuildInputs = [ setuptools ];
# circular dependencies with fixtures
# check in passthru.tests.pytest to escape infinite recursion with fixtures
doCheck = false;
passthru.tests = {
tests = callPackage ./tests.nix { };
};
pythonImportsCheck = [ "pbr" ];
meta = with lib; {
homepage = "http://docs.openstack.org/developer/pbr/";
license = licenses.asl20;
description = "Python Build Reasonableness";
homepage = "https://github.com/openstack/pbr";
license = licenses.asl20;
maintainers = teams.openstack.members;
};
}
@@ -0,0 +1,49 @@
{ stdenv
, buildPythonPackage
, git
, gnupg
, pbr
, mock
, sphinx
, stestr
, testresources
, testscenarios
, virtualenv
}:
buildPythonPackage rec {
pname = "pbr";
inherit (pbr) version;
src = pbr.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 = [
pbr
git
gnupg
mock
sphinx
stestr
testresources
testscenarios
virtualenv
];
checkPhase = ''
stestr run -e <(echo "
pbr.tests.test_core.TestCore.test_console_script_develop
pbr.tests.test_core.TestCore.test_console_script_install
pbr.tests.test_wsgi.TestWsgiScripts.test_with_argument
pbr.tests.test_wsgi.TestWsgiScripts.test_wsgi_script_run
")
'';
}
@@ -40,7 +40,7 @@ buildPythonPackage rec {
doCheck = false;
passthru.tests = {
pytest = callPackage ./tests.nix { };
tests = callPackage ./tests.nix { };
};
pythonImportsCheck = [ "stestr" ];