2017-01-22 09:31:29 +00:00
|
|
|
ensure_python_build_installed() {
|
|
|
|
if [ ! -f "$(python_build_path)" ]; then
|
|
|
|
download_python_build
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
download_python_build() {
|
|
|
|
echo "Downloading python-build..."
|
2017-05-06 11:09:55 +01:00
|
|
|
local pyenv_url="https://github.com/yyuu/pyenv.git"
|
2017-01-22 09:31:29 +00:00
|
|
|
git clone $pyenv_url "$(pyenv_path)"
|
|
|
|
}
|
|
|
|
|
|
|
|
python_build_path() {
|
|
|
|
echo "$(pyenv_path)/plugins/python-build/bin/python-build"
|
|
|
|
}
|
|
|
|
|
|
|
|
pyenv_path() {
|
|
|
|
echo "$(dirname $(dirname $0))/pyenv"
|
|
|
|
}
|