mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-02 11:53:27 +00:00
python39Packages.pbr: enable tests, adopt into openstack team
This commit is contained in:
parent
a13bf1828b
commit
bd6c0565b2
@ -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 = {
|
||||
pytest = 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;
|
||||
};
|
||||
}
|
||||
|
49
pkgs/development/python-modules/pbr/tests.nix
Normal file
49
pkgs/development/python-modules/pbr/tests.nix
Normal file
@ -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
|
||||
")
|
||||
'';
|
||||
}
|
Loading…
Reference in New Issue
Block a user