Skip to content

Commit

Permalink
python: Remove pyenv init woraround for pyenv >= 2.3.0
Browse files Browse the repository at this point in the history
The startup logic and instructions have been updated for simplicity in
pyenv 2.3.0. The workaround for pyenv init is no longer necessary.

Signed-off-by: Indrajit Raychaudhuri <[email protected]>
  • Loading branch information
johndbritton authored and indrajitr committed Nov 5, 2023
1 parent 5ac930d commit 457ade4
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions modules/python/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,7 @@ if [[ -s "${local_pyenv::=${PYENV_ROOT:-$HOME/.pyenv}/bin/pyenv}" ]] \
# Ensure manually installed pyenv is added to path when present.
[[ -s $local_pyenv ]] && path=($local_pyenv:h $path)

# pyenv 2+ requires shims to be added to path before being initialized.
autoload -Uz is-at-least
if is-at-least 2 ${"$(pyenv --version 2>&1)"[(w)2]}; then
eval "$(pyenv init --path zsh)"
fi

# Load pyenv into the shell session.
eval "$(pyenv init - zsh)"

# Prepend PEP 370 per user site packages directory, which defaults to
Expand Down

0 comments on commit 457ade4

Please sign in to comment.