Skip to content

Commit 107abf7

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 fe373b7 commit 107abf7

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
@@ -2468,9 +2468,16 @@ def run_command(cmd):
24682468
else:
24692469
python = os.path.join(venv, 'bin', python_exe)
24702470

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

0 commit comments

Comments
 (0)