Created
December 20, 2015 16:27
-
-
Save tek/676744f01fa56c5b3cae to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_setup_pyenv_plugin_dir() | |
{ | |
for plugin ($PYENV_PLUGINS/*(/)) { | |
if ! [[ -e $PYENV_PLUGIN_DIR/${plugin:t} ]] { | |
ln -s $plugin $PYENV_ROOT/plugins | |
} | |
} | |
} | |
pyenvstart() | |
{ | |
export PYENV_ROOT="$HOME/usr/opt/pyenv" | |
export PYENV_PLUGIN_DIR="$PYENV_ROOT/plugins" | |
export PYENV_PLUGINS="$HOME/usr/opt/pyenv-plugins" | |
if [[ -d $PYENV_ROOT ]] { | |
export PATH="$PYENV_ROOT/bin:$PATH" | |
_setup_pyenv_plugin_dir | |
eval "$(pyenv init -)" | |
export PYENV_VERSION="$(pyenv version-name)" | |
export PYENV_PY="$(pyenv prefix)/lib/python${PYENV_VERSION[1,3]}" | |
export PYENV_SITE="$PYENV_PY/site-packages" | |
} else { | |
print 'pyenv missing!' | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment