From 2303cafc1480d528c08b1149d9447183da5b049d Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Mon, 28 Apr 2025 07:30:27 -0400 Subject: [PATCH 1/3] No need to install wheel any more setuptools has had a native bdist_wheel since 70.1.0: https://setuptools.pypa.io/en/latest/history.html#v70-1-0 --- testing/cffi0/test_zintegration.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/testing/cffi0/test_zintegration.py b/testing/cffi0/test_zintegration.py index 7612ba00..80f9b1eb 100644 --- a/testing/cffi0/test_zintegration.py +++ b/testing/cffi0/test_zintegration.py @@ -17,14 +17,14 @@ def create_venv(name): try: # FUTURE: we should probably update this to use venv for at least more modern Pythons, and # install setuptools/pip/etc explicitly for the tests that require them (as venv has stopped including - # setuptools and wheel by default for newer versions). + # setuptools by default for newer versions). subprocess.check_call(['virtualenv', #'--never-download', <= could be added, but causes failures # in random cases on random machines '-p', os.path.abspath(sys.executable), str(tmpdir)]) - # Python 3.12 venv/virtualenv no longer include setuptools and wheel by default, which + # Python 3.12 venv/virtualenv no longer include setuptools by default, which # breaks a number of these tests; ensure it's always present for 3.12+ if sys.version_info >= (3, 12): subprocess.check_call([ @@ -33,7 +33,6 @@ def create_venv(name): 'pip', 'install', 'setuptools', - 'wheel', '--upgrade' ]) From d85a104ea8f0e4f909bf884754353f80d8e4d134 Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Mon, 28 Apr 2025 12:04:37 -0400 Subject: [PATCH 2/3] Explicitly specify --no-build-isolation as that's our expectation in these tests Previously we relied on pip to build the packages in non-PEP517 mode, which implied no build isolation. The latest `virtualenv` (with pypa/virtualenv#2868) won't include `wheel` in the virtualenv, which will mean that pip uses PEP-517 mode, which is isolated by default. --- testing/cffi0/test_zintegration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/cffi0/test_zintegration.py b/testing/cffi0/test_zintegration.py index 80f9b1eb..3c31f985 100644 --- a/testing/cffi0/test_zintegration.py +++ b/testing/cffi0/test_zintegration.py @@ -98,7 +98,7 @@ def remove(dir): # there's a setuptools/easy_install bug that causes this to fail when the build/install occur together and # we're in the same directory with the build (it tries to look up dependencies for itself on PyPI); # subsequent runs will succeed because this test doesn't properly clean up the build- use pip for now. - subprocess.check_call((vp, '-m', 'pip', 'install', '.'), env=env) + subprocess.check_call((vp, '-m', 'pip', 'install', '.', '--no-build-isolation'), env=env) subprocess.check_call((vp, str(python_f)), env=env) finally: os.chdir(olddir) From 9499397695cae5202077be49cb734d5a6bccf95c Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Mon, 28 Apr 2025 12:05:10 -0400 Subject: [PATCH 3/3] Upgrade pip, as the tests now practically depend on pip >= 25.1 --- .github/workflows/ci.yaml | 2 +- testing/cffi0/test_zintegration.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6dca8cb9..cf83f3fe 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -298,7 +298,7 @@ jobs: CIBW_MUSLLINUX_AARCH64_IMAGE: ${{ matrix.musllinux_img || 'musllinux_1_1' }} CIBW_PRERELEASE_PYTHONS: 'True' CIBW_FREE_THREADED_SUPPORT: 'True' - CIBW_TEST_REQUIRES: pytest setuptools # 3.12+ no longer includes distutils, just always ensure setuptools is present + CIBW_TEST_REQUIRES: pytest setuptools pip>=25.1 # 3.12+ no longer includes distutils, just always ensure setuptools is present CIBW_TEST_COMMAND: PYTHONUNBUFFERED=1 python -m pytest ${{ matrix.test_args || '{project}' }} # default to test all run: | set -eux diff --git a/testing/cffi0/test_zintegration.py b/testing/cffi0/test_zintegration.py index 3c31f985..c9395725 100644 --- a/testing/cffi0/test_zintegration.py +++ b/testing/cffi0/test_zintegration.py @@ -32,6 +32,7 @@ def create_venv(name): '-m', 'pip', 'install', + 'pip', 'setuptools', '--upgrade' ])