Add configuration for python
This commit is contained in:
parent
56845c5c19
commit
4d9e800d94
8 changed files with 132 additions and 0 deletions
21
.profile
21
.profile
|
|
@ -45,6 +45,12 @@ _prepend_to_path "$HOME/.local/bin"
|
|||
[ -f "$HOME/.config/shell/env" ] && . "$HOME/.config/shell/env"
|
||||
|
||||
|
||||
# Must be between sourcing ~/.config/shell/env and ~/.config/shell/aliases
|
||||
# because the first defines the `pyenv` related environment variables
|
||||
# while the second creates `pyenv` related aliases
|
||||
_prepend_to_path "$PYENV_ROOT/bin"
|
||||
|
||||
|
||||
[ -f "$HOME/.config/shell/aliases" ] && . "$HOME/.config/shell/aliases"
|
||||
|
||||
|
||||
|
|
@ -62,5 +68,20 @@ fi
|
|||
# which then also ensures that this file is sourced
|
||||
|
||||
|
||||
if [ -z "${PYENV_SHELL:-}" ] && _command_exists pyenv; then
|
||||
|
||||
eval "$(pyenv init -)" || echo "WARN: pyenv init failed" >&2
|
||||
|
||||
case $- in
|
||||
*i*)
|
||||
if [ -d "$PYENV_ROOT/plugins/pyenv-virtualenv" ]; then
|
||||
eval "$(pyenv virtualenv-init -)" || true
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
|
||||
# When everything is loaded, show a little welcome message
|
||||
case $- in *i*) [ -f "$HOME/.config/shell/welcome" ] && . "$HOME/.config/shell/welcome";; esac
|
||||
|
|
|
|||
Loading…
Reference in a new issue