From 777d408f7bf654547b6e15bde153ace2aece3b0c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Thu, 24 Feb 2022 00:38:55 +0000 Subject: [PATCH 1/2] python310Packages.pytest-console-scripts: 1.2.2 -> 1.3 --- .../python-modules/pytest-console-scripts/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pytest-console-scripts/default.nix b/pkgs/development/python-modules/pytest-console-scripts/default.nix index 609ed9cc343e..76323a3498a9 100644 --- a/pkgs/development/python-modules/pytest-console-scripts/default.nix +++ b/pkgs/development/python-modules/pytest-console-scripts/default.nix @@ -9,11 +9,11 @@ buildPythonPackage rec { pname = "pytest-console-scripts"; - version = "1.2.2"; + version = "1.3"; src = fetchPypi { inherit pname version; - sha256 = "caeaaaf57f3a99e4482127e8a18467a1cfd49c92f4b37e5578d0bc40bf1b3394"; + sha256 = "sha256-w8rb9nz7MKHrHMHp5py23kTDpkhCbxub9j6F2XNX/H8="; }; postPatch = '' # setuptools-scm is pinned to <6 because it dropped Python 3.5 From 2ebe62c929af98a38ca58449983e4817760970d5 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 25 Feb 2022 12:10:11 +0100 Subject: [PATCH 2/2] python3Packages.pytest-console-scripts: clean-ip --- .../pytest-console-scripts/default.nix | 33 +++++++++++++------ 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/pytest-console-scripts/default.nix b/pkgs/development/python-modules/pytest-console-scripts/default.nix index 76323a3498a9..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.3"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-w8rb9nz7MKHrHMHp5py23kTDpkhCbxub9j6F2XNX/H8="; + 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";