Fix tools/provision on OS X.
See the comment for details.
This commit is contained in:
parent
a7094a47dc
commit
df04e4e1ca
|
@ -76,8 +76,15 @@ the Python version this command is executed with."""
|
||||||
# `import_module`.
|
# `import_module`.
|
||||||
activate_module_dir = os.path.abspath(os.path.join(venv_dir, venv_exec_dir))
|
activate_module_dir = os.path.abspath(os.path.join(venv_dir, venv_exec_dir))
|
||||||
sys.path.append(activate_module_dir)
|
sys.path.append(activate_module_dir)
|
||||||
|
|
||||||
import_module('activate_this')
|
import_module('activate_this')
|
||||||
|
|
||||||
|
# On OS X, ensure we use the virtualenv version of the python binary for
|
||||||
|
# future subprocesses instead of the version that this script was launched with. See
|
||||||
|
# https://stackoverflow.com/questions/26323852/whats-the-meaning-of-pyvenv-launcher-environment-variable
|
||||||
|
if '__PYVENV_LAUNCHER__' in os.environ:
|
||||||
|
del os.environ['__PYVENV_LAUNCHER__']
|
||||||
|
|
||||||
# In order to install all required packages for the venv, `pip` needs to be executed by
|
# In order to install all required packages for the venv, `pip` needs to be executed by
|
||||||
# the venv's Python interpreter. `--prefix venv_dir` ensures that all modules are installed
|
# the venv's Python interpreter. `--prefix venv_dir` ensures that all modules are installed
|
||||||
# in the right place.
|
# in the right place.
|
||||||
|
|
Loading…
Reference in a new issue