Should not try to find system-site-packages if virtualenv is a conda's environment (#104)

This commit is contained in:
Yamashita, Yuu
2015-11-26 11:06:43 +00:00
parent 1edff311d5
commit bdda7214a8

View File

@@ -5,8 +5,11 @@
if [ ! -x "${PYENV_COMMAND_PATH}" ]; then if [ ! -x "${PYENV_COMMAND_PATH}" ]; then
virtualenv_prefix="$(pyenv-virtualenv-prefix 2>/dev/null || true)" virtualenv_prefix="$(pyenv-virtualenv-prefix 2>/dev/null || true)"
if [ -d "${virtualenv_prefix}" ]; then if [ -d "$(pyenv-prefix)" ] && [ -d "${virtualenv_prefix}" ]; then
unset include_system_site_packages unset include_system_site_packages
if [ -f "$(pyenv-prefix)/bin/conda" ]; then
: # do nothing for conda's environments
else
if [ -f "$(pyenv-prefix)/pyvenv.cfg" ]; then if [ -f "$(pyenv-prefix)/pyvenv.cfg" ]; then
# pyvenv # pyvenv
if grep -q -i "include-system-site-packages *= *true" "$(pyenv-prefix)/pyvenv.cfg" 1>/dev/null 2>&1; then if grep -q -i "include-system-site-packages *= *true" "$(pyenv-prefix)/pyvenv.cfg" 1>/dev/null 2>&1; then
@@ -29,4 +32,5 @@ if [ ! -x "${PYENV_COMMAND_PATH}" ]; then
fi fi
fi fi
fi fi
fi
fi fi