change 02_test to check if virtualenv is properly used
This commit is contained in:
@@ -145,6 +145,8 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
|
||||
venv_dir=`mktemp -d`/venv
|
||||
python -m virtualenv "$venv_dir"
|
||||
|
||||
export __CIBW_VIRTUALENV_PATH__=$venv_dir
|
||||
|
||||
# run the tests in a subshell to keep that `activate`
|
||||
# script from polluting the env
|
||||
(
|
||||
|
||||
@@ -209,6 +209,7 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
|
||||
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)
|
||||
|
||||
@@ -197,6 +197,7 @@ def build(project_dir, output_dir, test_command, test_requires, test_extras, bef
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user