From eebfd71a6da396b011e664604c9991543205d780 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Mon, 20 Mar 2023 22:53:13 +0100 Subject: [PATCH] Make PEP 517 mutation tests use pinned old setuptools (#80262) * Pin setuptools to lowest supported @ PEP 517 test This allows catching the behavior of builds under old setuptools. * Stop invoking `setup.py install` in tests This is not the part we care about since it involves dealing with the external runtime dependencies rather than building our source distribution. --- .../canonical-pep517-self-packaging/runme_test.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/integration/targets/canonical-pep517-self-packaging/runme_test.py b/test/integration/targets/canonical-pep517-self-packaging/runme_test.py index 7aa096b03e6..86b0f7532a8 100644 --- a/test/integration/targets/canonical-pep517-self-packaging/runme_test.py +++ b/test/integration/targets/canonical-pep517-self-packaging/runme_test.py @@ -207,18 +207,23 @@ def test_installing_sdist_build_with_modern_deps_to_old_env( with TarFile.gzopen(tmp_path_sdist_w_modern_tools) as sdist_fd: sdist_fd.extractall(path=tmp_dir_unpacked_sdist_root) + pip_install( + venv_python_exe, 'setuptools', + env_vars={ + 'PIP_CONSTRAINT': str(LOWEST_SUPPORTED_BUILD_DEPS_FILE), + }, + ) with _chdir_cm(tmp_dir_unpacked_sdist_path): run_with_venv_python( venv_python_exe, 'setup.py', 'sdist', env_vars={'PATH': environ['PATH']}, ) - run_with_venv_python( - venv_python_exe, 'setup.py', 'install', - env_vars={'PATH': environ['PATH']}, - ) else: pip_install( venv_python_exe, str(tmp_path_sdist_w_modern_tools), '--no-deps', + env_vars={ + 'PIP_CONSTRAINT': str(LOWEST_SUPPORTED_BUILD_DEPS_FILE), + }, ) # Smoke test — installing an sdist with pip that does not support invoking