@@ -2416,7 +2416,7 @@ def _findwheel(pkgname):
24162416 filenames = os .listdir (wheel_dir )
24172417 filenames = sorted (filenames , reverse = True ) # approximate "newest" first
24182418 for filename in filenames :
2419- # filename is like 'setuptools-67.6.1 -py3-none-any.whl'
2419+ # filename is like 'setuptools-{version} -py3-none-any.whl'
24202420 if not filename .endswith (".whl" ):
24212421 continue
24222422 prefix = pkgname + '-'
@@ -2425,16 +2425,16 @@ def _findwheel(pkgname):
24252425 raise FileNotFoundError (f"No wheel for { pkgname } found in { wheel_dir } " )
24262426
24272427
2428- # Context manager that creates a virtual environment, install setuptools and wheel in it
2429- # and returns the path to the venv directory and the path to the python executable
2428+ # Context manager that creates a virtual environment, install setuptools in it,
2429+ # and returns the paths to the venv directory and the python executable
24302430@contextlib .contextmanager
2431- def setup_venv_with_pip_setuptools_wheel (venv_dir ):
2432- import shlex
2431+ def setup_venv_with_pip_setuptools (venv_dir ):
24332432 import subprocess
24342433 from .os_helper import temp_cwd
24352434
24362435 def run_command (cmd ):
24372436 if verbose :
2437+ import shlex
24382438 print ()
24392439 print ('Run:' , ' ' .join (map (shlex .quote , cmd )))
24402440 subprocess .run (cmd , check = True )
@@ -2458,10 +2458,10 @@ def run_command(cmd):
24582458 else :
24592459 python = os .path .join (venv , 'bin' , python_exe )
24602460
2461- cmd = [ python , '-X' , 'dev' ,
2461+ cmd = ( python , '-X' , 'dev' ,
24622462 '-m' , 'pip' , 'install' ,
24632463 _findwheel ('setuptools' ),
2464- _findwheel ( 'wheel' )]
2464+ )
24652465 run_command (cmd )
24662466
24672467 yield python
0 commit comments