From 457ade4f014285d47fec229c5210af752f5be7e4 Mon Sep 17 00:00:00 2001 From: John Britton Date: Thu, 5 Oct 2023 14:45:56 -0400 Subject: [PATCH] python: Remove pyenv init woraround for pyenv >= 2.3.0 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 --- modules/python/init.zsh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/modules/python/init.zsh b/modules/python/init.zsh index ce2fc69..c303cad 100644 --- a/modules/python/init.zsh +++ b/modules/python/init.zsh @@ -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