Skip to content

Commit 0c097b7

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 01f8cc4 commit 0c097b7

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
@@ -2493,9 +2493,16 @@ def run_command(cmd):
24932493
else:
24942494
python = os.path.join(venv, 'bin', python_exe)
24952495

2496+
setuptools_whl = _findwheel('setuptools')
2497+
whl_filename = os.path.basename(setuptools_whl)
2498+
setuptools_major = int(whl_filename.split('-')[1].split('.')[0])
2499+
if setuptools_major >= 71: # we need 70.1+, but that's OK
2500+
wheels = (setuptools_whl,)
2501+
else:
2502+
wheels = (setuptools_whl, _findwheel('wheel'))
24962503
cmd = (python, '-X', 'dev',
24972504
'-m', 'pip', 'install',
2498-
_findwheel('setuptools'),
2505+
*wheels,
24992506
)
25002507
run_command(cmd)
25012508

0 commit comments

Comments
 (0)