From 9470ca623fb1d6ed00a8bf8d80b7603f60e10c8a Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Sat, 7 Sep 2019 21:52:49 +0100 Subject: [PATCH] Use python -m virtualenv on Windows and Linux --- cibuildwheel/linux.py | 2 +- cibuildwheel/windows.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cibuildwheel/linux.py b/cibuildwheel/linux.py index e934ef73..978d3010 100644 --- a/cibuildwheel/linux.py +++ b/cibuildwheel/linux.py @@ -89,7 +89,7 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef # there are no dependencies that were pulled in at build time. "$PYBIN/pip" install virtualenv venv_dir=`mktemp -d`/venv - "$PYBIN/virtualenv" $venv_dir + "$PYBIN/python" -m virtualenv $venv_dir source $venv_dir/bin/activate # Check that we are using the Python from the virtual environment diff --git a/cibuildwheel/windows.py b/cibuildwheel/windows.py index 034879e9..8f2d90b5 100644 --- a/cibuildwheel/windows.py +++ b/cibuildwheel/windows.py @@ -125,7 +125,7 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef # there are no dependencies that were pulled in at build time. shell(['pip', 'install', 'virtualenv'], env=env) venv_dir = tempfile.mkdtemp() - shell(['virtualenv', venv_dir], env=env) + shell(['python', '-m', 'virtualenv', venv_dir], env=env) env['PATH'] = os.pathsep.join([os.path.join(venv_dir, 'Scripts'), env['PATH']]) # check that we are using the Python from the virtual environment