10000 00461: Downstream only: Install wheel in test venvs when setuptools < 71 · python/cpython@c415b73 · GitHub
[go: up one dir, main page]

Skip to content

Commit c415b73

Browse files
committed
00461: Downstream only: Install wheel in test venvs when setuptools < 71
This can be removed when Fedora 41 goes EOL (or updates setuptools).
1 parent 267e3a7 commit c415b73

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Lib/test/support/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2466,9 +2466,16 @@ def run_command(cmd):
24662466
else:
24672467
python = os.path.join(venv, 'bin', python_exe)
24682468

2469+
setuptools_whl = _findwheel('setuptools')
2470+
whl_filename = os.path.basename(setuptools_whl)
2471+
setuptools_major = int(whl_filename.split('-')[1].split('.')[0])
2472+
if setuptools_major >= 71: # we need 70.1+, but that's OK
2473+
wheels = (setuptools_whl,)
2474+
else:
2475+
wheels = (setuptools_whl, _findwheel('wheel'))
24692476
cmd = (python, '-X', 'dev',
24702477
'-m', 'pip', 'install',
2471-
_findwheel('setuptools'),
2478+
*wheels,
24722479
)
24732480
run_command(cmd)
24742481

0 commit comments

Comments
 (0)
0