1
0
Fork 0

add pyenv to python module

pull/392/head
Marcos Trovilho 12 years ago
parent f4d9b32de9
commit b91bc8a1d2

@ -16,6 +16,16 @@ execution of `pythonz`.
Install Python versions with `pythonz install` into *~/.pythonz/pythons*.
pyenv
-----
An alternative pythonz is to use [pyenv][6], which allows for switching between
multiple, isolated Python installations in the home directory.
### Usage
Install Python versions with `pyenv install` into *~/.pyenv/versions*.
Local Package Installation
--------------------------
@ -107,4 +117,4 @@ Authors
[3]: http://pypi.python.org/pypi/virtualenv
[4]: http://saghul.github.com/pythonz/
[5]: https://github.com/sorin-ionescu/prezto/issues
[6]: https://github.com/yyuu/pyenv

@ -9,10 +9,20 @@
# Load pythonz into the shell session.
if [[ -s $HOME/.pythonz/bin/pythonz ]]; then
path=($HOME/.pythonz/bin $path)
# Load manually installed pyenv into the shell session.
elif [[ -s "$HOME/.pyenv/bin/pyenv" ]]; then
path=("$HOME/.pyenv/bin" $path)
eval "$(pyenv init -)"
# Load package manager installed pyenv into the shell session.
elif (( $+commands[pyenv] )); then
eval "$(pyenv init -)"
fi
# Return if requirements are not found.
if (( ! $+commands[python] && ! $+commands[pythonz] )); then
if (( ! $+commands[python] && ! ( $+commands[pythonz] || $+commands[pyenv] ) )); then
return 1
fi

Loading…
Cancel
Save