-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc-pyenv
37 lines (31 loc) · 1.04 KB
/
.bashrc-pyenv
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# -------------------------------------------------------------------------------
# ,-------,
# | PYENV |
# '-------'
# define $PYENV and $PYENV/bin to $PATH
PYENV_ROOT="$HOME/.pyenv"
PATH="$PYENV_ROOT/bin:$PATH"
pyenv_use_script=1
source ~/.pyenv_optional_setup.sh
# # PYENV setup functions and variable
# if ( which pyenv >/dev/null ); then
# eval "$(pyenv init -)"
# else
# echo "command pyenv not available: install pyenv"
# fi
# ,------------------,
# | PYENV-VIRTUALENV |
# '------------------'
pyenv-virtualenv-setup-autoactivation () {
if pyenv commands | grep virtualenv-init >/dev/null; then
# diable prompt setting: can be removed in future pyenv-virtualenv release
PYENV_VIRTUALENV_DISABLE_PROMPT=1
# pyenv-virtualenv setup
eval "$(pyenv virtualenv-init -)"
else
echo "pyenv virtualenv-init command not available: install pyenv-virtualenv"
fi
}
# OPTIONAL: pyenv-virtualenv autoactivation of virtualenvs
pyenv_virtualenv_noauto=1 # disable
source .pyenv-virtualenv_optional_setup.sh