diff --git a/pkgs/development/python-modules/pytest-console-scripts/default.nix b/pkgs/development/python-modules/pytest-console-scripts/default.nix index 609ed9cc343e..6bc6fb22b031 100644 --- a/pkgs/development/python-modules/pytest-console-scripts/default.nix +++ b/pkgs/development/python-modules/pytest-console-scripts/default.nix @@ -5,28 +5,41 @@ , python , mock , setuptools-scm +, pythonOlder }: buildPythonPackage rec { pname = "pytest-console-scripts"; - version = "1.2.2"; + version = "1.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "caeaaaf57f3a99e4482127e8a18467a1cfd49c92f4b37e5578d0bc40bf1b3394"; + hash = "sha256-w8rb9nz7MKHrHMHp5py23kTDpkhCbxub9j6F2XNX/H8="; }; - postPatch = '' - # setuptools-scm is pinned to <6 because it dropped Python 3.5 - # support. That's not something that affects us. - substituteInPlace setup.py --replace "'setuptools_scm<6'" "'setuptools_scm'" - # Patch the shebang of a script generated during test. - substituteInPlace tests/test_run_scripts.py --replace "#!/usr/bin/env python" "#!${python.interpreter}" - ''; SETUPTOOLS_SCM_PRETEND_VERSION = version; - nativeBuildInputs = [ setuptools-scm ]; - checkInputs = [ mock pytestCheckHook ]; + nativeBuildInputs = [ + setuptools-scm + ]; + + checkInputs = [ + mock + pytestCheckHook + ]; + + postPatch = '' + # Patch the shebang of a script generated during test. + substituteInPlace tests/test_run_scripts.py \ + --replace "#!/usr/bin/env python" "#!${python.interpreter}" + ''; + + pythonImportsCheck = [ + "pytest_console_scripts" + ]; meta = with lib; { description = "Pytest plugin for testing console scripts";