Skip to content

Commit ef606dc

Browse files
hroncokbefeleme
authored andcommitted
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 789c3a7 commit ef606dc

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Lib/test/support/__init__.py

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

2515+
setuptools_whl = _findwheel('setuptools')
2516+
whl_filename = os.path.basename(setuptools_whl)
2517+
setuptools_major = int(whl_filename.split('-')[1].split('.')[0])
2518+
if setuptools_major >= 71: # we need 70.1+, but that's OK
2519+
wheels = (setuptools_whl,)
2520+
else:
2521+
wheels = (setuptools_whl, _findwheel('wheel'))
25152522
cmd = (python, '-X', 'dev',
25162523
'-m', 'pip', 'install',
2517-
_findwheel('setuptools'),
2524+
*wheels,
25182525
)
25192526
run_command(cmd)
25202527

0 commit comments

Comments
 (0)