mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-08 11:33:55 -05:00
Source conda package activate/deactivat scripts if exist (fixes #173)
This commit is contained in:
@@ -231,3 +231,19 @@ EOS
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# conda package anaconda/miniconda scripts (#173)
|
||||||
|
if [ -x "${prefix}/bin/conda" ]; then
|
||||||
|
shopt -s nullglob
|
||||||
|
case "${shell}" in
|
||||||
|
fish )
|
||||||
|
: # conda doesn't support fish
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
for script in "${prefix}/etc/conda/activate.d"/*.sh; do
|
||||||
|
echo ". \"${script}\";"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shopt -u nullglob
|
||||||
|
fi
|
||||||
|
|||||||
@@ -58,6 +58,22 @@ if [ -n "$PYENV_VIRTUALENV_VERBOSE_ACTIVATE" ]; then
|
|||||||
echo "pyenv-virtualenv: deactivate ${venv}" 1>&2
|
echo "pyenv-virtualenv: deactivate ${venv}" 1>&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# conda package anaconda/miniconda scripts (#173)
|
||||||
|
if [ -x "${prefix}/bin/conda" ]; then
|
||||||
|
shopt -s nullglob
|
||||||
|
case "${shell}" in
|
||||||
|
fish )
|
||||||
|
: # conda doesn't support fish
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
for script in "${prefix}/etc/conda/deactivate.d"/*.sh; do
|
||||||
|
echo ". \"${script}\";"
|
||||||
|
done
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shopt -u nullglob
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -n "${PYENV_ACTIVATE_SHELL}" ]; then
|
if [ -n "${PYENV_ACTIVATE_SHELL}" ]; then
|
||||||
# shell version set in pyenv-sh-activate should be unset
|
# shell version set in pyenv-sh-activate should be unset
|
||||||
# https://github.com/yyuu/pyenv-virtualenv/issues/61
|
# https://github.com/yyuu/pyenv-virtualenv/issues/61
|
||||||
|
|||||||
Reference in New Issue
Block a user