Use python -m virtualenv on Windows and Linux
This commit is contained in:
@@ -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.
|
# there are no dependencies that were pulled in at build time.
|
||||||
"$PYBIN/pip" install virtualenv
|
"$PYBIN/pip" install virtualenv
|
||||||
venv_dir=`mktemp -d`/venv
|
venv_dir=`mktemp -d`/venv
|
||||||
"$PYBIN/virtualenv" $venv_dir
|
"$PYBIN/python" -m virtualenv $venv_dir
|
||||||
source $venv_dir/bin/activate
|
source $venv_dir/bin/activate
|
||||||
|
|
||||||
# Check that we are using the Python from the virtual environment
|
# Check that we are using the Python from the virtual environment
|
||||||
|
|||||||
@@ -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.
|
# there are no dependencies that were pulled in at build time.
|
||||||
shell(['pip', 'install', 'virtualenv'], env=env)
|
shell(['pip', 'install', 'virtualenv'], env=env)
|
||||||
venv_dir = tempfile.mkdtemp()
|
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']])
|
env['PATH'] = os.pathsep.join([os.path.join(venv_dir, 'Scripts'), env['PATH']])
|
||||||
|
|
||||||
# check that we are using the Python from the virtual environment
|
# check that we are using the Python from the virtual environment
|
||||||
|
|||||||
Reference in New Issue
Block a user