python311Packages.testscenarios: fix build

by providing pbr and switch to pep517 builder.
This commit is contained in:
Martin Weinelt 2023-12-04 02:55:31 +01:00
parent 8df5d6262c
commit de8442db0d
No known key found for this signature in database
GPG Key ID: 87C1E9888F856759

View File

@ -1,13 +1,22 @@
{ lib
, buildPythonPackage
, fetchPypi
# build-system
, pbr
, setuptools
# dependencies
, testtools
# tests
, python
}:
buildPythonPackage rec {
pname = "testscenarios";
version = "0.5.0";
format = "setuptools";
pyproject = true;
src = fetchPypi {
inherit pname version;
@ -20,11 +29,27 @@ buildPythonPackage rec {
--replace "catch = 1" ""
'';
propagatedBuildInputs = [ testtools ];
nativeBuildInputs = [
pbr
setuptools
];
propagatedBuildInputs = [
pbr
testtools
];
checkPhase = ''
runHook preCheck
${python.interpreter} -m testtools.run testscenarios.tests.test_suite
runHook postCheck
'';
meta = with lib; {
description = "A pyunit extension for dependency injection";
homepage = "https://pypi.python.org/pypi/testscenarios";
homepage = "https://github.com/testing-cabal/testscenarios";
license = licenses.asl20;
};