From 7d99ccfc7bda7ebd4893f4df0e1f430dcb0312c5 Mon Sep 17 00:00:00 2001 From: Yannick Jadoul Date: Tue, 12 Nov 2019 23:47:06 +0100 Subject: [PATCH] Collapse multiple 'pip install's into one in windows.py and macos.py, and replace full path by 'python' in windows.py --- cibuildwheel/macos.py | 4 +--- cibuildwheel/windows.py | 5 ++--- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/cibuildwheel/macos.py b/cibuildwheel/macos.py index fa07ca12..40e59a86 100644 --- a/cibuildwheel/macos.py +++ b/cibuildwheel/macos.py @@ -92,9 +92,7 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef call(['python', get_pip_script, '--no-setuptools', '--no-wheel'], env=env) assert os.path.exists(os.path.join(installation_bin_path, 'pip')) call(['pip', '--version'], env=env) - call(['pip', 'install', '--upgrade', 'setuptools'], env=env) - call(['pip', 'install', 'wheel'], env=env) - call(['pip', 'install', 'delocate'], env=env) + call(['pip', 'install', '--upgrade', 'setuptools', 'wheel', 'delocate'], env=env) # setup dirs if os.path.exists('/tmp/built_wheel'): diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 6dda391e..4b1bea8b 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -124,14 +124,13 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef # make sure pip is installed if not os.path.exists(os.path.join(config_python_path, 'Scripts', 'pip.exe')): - simple_shell([os.path.join(config_python_path, 'python.exe'), get_pip_script], env=env) + simple_shell(['python', get_pip_script], env=env) assert os.path.exists(os.path.join(config_python_path, 'Scripts', 'pip.exe')) # prepare the Python environment simple_shell(['python', '-m', 'pip', 'install', '--upgrade', 'pip'], env=env) simple_shell(['pip', '--version'], env=env) - simple_shell(['pip', 'install', '--upgrade', 'setuptools'], env=env) - simple_shell(['pip', 'install', 'wheel'], env=env) + simple_shell(['pip', 'install', '--upgrade', 'setuptools', 'wheel'], env=env) # setup dirs if os.path.exists(built_wheel_dir):