Skip to content

Commit

Permalink
python: only override virtualenvwrapper python when needed
Browse files Browse the repository at this point in the history
  • Loading branch information
belak committed Dec 13, 2017
1 parent 7d77c7b commit d76b2f3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modules/autosuggestions/external
12 changes: 6 additions & 6 deletions modules/python/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,16 @@ if (( $+VIRTUALENVWRAPPER_VIRTUALENV || $+commands[virtualenv] )) && \
# Fallback to 'virtualenvwrapper' without 'pyenv' wrapper if available
# in '$path' or in an alternative location on a Debian based system.
#
# If the python-path was manually specified, use that. Otherwise, fall back
# to python3 then python2 in that order. This is needed to fix an issue with
# virtualenvwrapper when used with homebrew, as it no longer shadows the
# system python.
# If the python-path was manually specified, use that. Otherwise, if
# homebrew is installed we fall back to python3 then python2 in that
# order. This is needed to fix an issue with virtualenvwrapper as homebrew
# no longer shadows the system python.
zstyle -s ':prezto:module:python:virtualenvwrapper' python-path '_venv_python'
if [[ -n "$_venv_python" ]]; then
export VIRTUALENVWRAPPER_PYTHON=$_venv_python
elif (( $+commands[python3] )); then
elif (( $+commands[brew] )) && (( $+commands[python3] )); then
export VIRTUALENVWRAPPER_PYTHON=$commands[python3]
elif (( $+commands[python2] )); then
elif (( $+commands[brew] )) && (( $+commands[python2] )); then
export VIRTUALENVWRAPPER_PYTHON=$commands[python2]
fi

Expand Down

0 comments on commit d76b2f3

Please sign in to comment.