Add TEST_ENVIRONMENT option and set PYTHONSAFEPATH=1 in the test env (#2388)
* Add TEST_ENVIRONMENT option and set PYTHONSAFEPATH=1 in the test env Closes https://github.com/pypa/cibuildwheel/issues/2358 * Add toml docs examples * Add TOML examples * Use double-quotes for windows
This commit is contained in:
@@ -380,6 +380,12 @@ def build(options: Options, tmp_path: Path) -> None:
|
||||
)
|
||||
virtualenv_env["VIRTUAL_ENV"] = str(venv_dir)
|
||||
|
||||
virtualenv_env["PYTHONSAFEPATH"] = "1"
|
||||
|
||||
virtualenv_env = build_options.test_environment.as_dictionary(
|
||||
prev_environment=virtualenv_env
|
||||
)
|
||||
|
||||
# check that we are using the Python from the virtual environment
|
||||
call("which", "python", env=virtualenv_env)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user