[provisioning] Fix pyenv installation under OSX

This commit is contained in:
Correl Roush 2018-02-28 10:07:41 -05:00
parent 34ddf11016
commit 34c6439b83

View file

@ -3,6 +3,8 @@ set -e
__PYTHON_VERSION=3.6.4 __PYTHON_VERSION=3.6.4
_recipe _path
case $_PLATFORM in case $_PLATFORM in
darwin) darwin)
_recipe brew _recipe brew
@ -19,13 +21,13 @@ case $_PLATFORM in
if [ ! -d ~/.pyenv ]; then if [ ! -d ~/.pyenv ]; then
_run "Install pyenv" bash <(curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer) _run "Install pyenv" bash <(curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer)
fi fi
_recipe _path
_path "${HOME}/.pyenv/bin" _path "${HOME}/.pyenv/bin"
_profile 'eval "$(pyenv init -)"'
_profile 'eval "$(pyenv virtualenv-init -)"'
;; ;;
esac esac
_profile 'eval "$(pyenv init -)"'
_profile 'eval "$(pyenv virtualenv-init -)"'
if ! [ -d ~/.pyenv/versions/${__PYTHON_VERSION} ]; then if ! [ -d ~/.pyenv/versions/${__PYTHON_VERSION} ]; then
_run "Install python ${__PYTHON_VERSION}" pyenv install ${__PYTHON_VERSION} _run "Install python ${__PYTHON_VERSION}" pyenv install ${__PYTHON_VERSION}
fi fi