Simplify virtualenv test in test_testing

This commit is contained in:
Yannick Jadoul
2020-06-14 00:37:34 +02:00
parent a06998e2f6
commit ed491d0e22
4 changed files with 9 additions and 11 deletions
-1
View File
@@ -200,7 +200,6 @@ def build(options: BuildOptions) -> None:
pip install {dependency_install_flags} virtualenv
venv_dir=`mktemp -d`/venv
python -m virtualenv --no-download "$venv_dir"
export __CIBW_VIRTUALENV_PATH__=$venv_dir
# run the tests in a subshell to keep that `activate`
# script from polluting the env
-1
View File
@@ -224,7 +224,6 @@ def build(options: BuildOptions) -> None:
os.path.join(venv_dir, 'bin'),
virtualenv_env['PATH'],
])
virtualenv_env["__CIBW_VIRTUALENV_PATH__"] = venv_dir
# check that we are using the Python from the virtual environment
call(['which', 'python'], env=virtualenv_env)
+1 -4
View File
@@ -206,13 +206,10 @@ def build(options: BuildOptions) -> None:
shell(['python', '-m', 'virtualenv', '--no-download', venv_dir], env=env)
virtualenv_env = env.copy()
venv_script_path = os.path.join(venv_dir, 'Scripts')
virtualenv_env['PATH'] = os.pathsep.join([
venv_script_path,
os.path.join(venv_dir, 'Scripts'),
virtualenv_env['PATH'],
])
virtualenv_env["__CIBW_VIRTUALENV_PATH__"] = venv_dir
# check that we are using the Python from the virtual environment
shell(['which', 'python'], env=virtualenv_env)