diff --git a/pkgs/development/python-modules/pytestrunner/2.nix b/pkgs/development/python-modules/pytestrunner/2.nix new file mode 100644 index 000000000000..d6203276b827 --- /dev/null +++ b/pkgs/development/python-modules/pytestrunner/2.nix @@ -0,0 +1,30 @@ +{ lib, buildPythonPackage, fetchPypi, setuptools_scm, pytest }: + +buildPythonPackage rec { + pname = "pytest-runner"; + version = "5.2"; + + src = fetchPypi { + inherit pname version; + sha256 = "96c7e73ead7b93e388c5d614770d2bae6526efd997757d3543fe17b557a0942b"; + }; + + nativeBuildInputs = [ setuptools_scm pytest ]; + + postPatch = '' + rm pytest.ini + ''; + + checkPhase = '' + py.test tests + ''; + + # Fixture not found + doCheck = false; + + meta = with lib; { + description = "Invoke py.test as distutils command with dependency resolution"; + homepage = "https://github.com/pytest-dev/pytest-runner"; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index be95234ecf1c..5267d8104f83 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6591,7 +6591,10 @@ in { pytest-rerunfailures = callPackage ../development/python-modules/pytest-rerunfailures { }; pytest-runner = self.pytestrunner; # added 2021-01-04 - pytestrunner = callPackage ../development/python-modules/pytestrunner { }; + pytestrunner = if isPy3k then + callPackage ../development/python-modules/pytestrunner { } + else + callPackage ../development/python-modules/pytestrunner/2.nix { }; pytest-sanic = callPackage ../development/python-modules/pytest-sanic { sanic = self.sanic.override { doCheck = false; };