From de8442db0d4b157368d871812b2d8fcd8e0ce01a Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Mon, 4 Dec 2023 02:55:31 +0100 Subject: [PATCH] python311Packages.testscenarios: fix build by providing pbr and switch to pep517 builder. --- .../python-modules/testscenarios/default.nix | 31 +++++++++++++++++-- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/testscenarios/default.nix b/pkgs/development/python-modules/testscenarios/default.nix index 4e7dcef3e90d..8218947d6868 100644 --- a/pkgs/development/python-modules/testscenarios/default.nix +++ b/pkgs/development/python-modules/testscenarios/default.nix @@ -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; };