setup: update pyenv before installing python (#23405)

old-commit-hash: 23346ae63c
commatwo_master
Greg Hogan 3 years ago committed by GitHub
parent 097110ba41
commit bd622f8583
  1. 6
      update_requirements.sh

@ -4,7 +4,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
cd $DIR cd $DIR
if ! command -v "pyenv" > /dev/null 2>&1; then if ! command -v "pyenv" > /dev/null 2>&1; then
echo "installing pyenv..." echo "pyenv install ..."
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
export PATH=$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH export PATH=$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH
fi fi
@ -13,7 +13,9 @@ export MAKEFLAGS="-j$(nproc)"
PYENV_PYTHON_VERSION=$(cat .python-version) PYENV_PYTHON_VERSION=$(cat .python-version)
if ! pyenv prefix ${PYENV_PYTHON_VERSION} &> /dev/null; then if ! pyenv prefix ${PYENV_PYTHON_VERSION} &> /dev/null; then
echo "pyenv ${PYENV_PYTHON_VERSION} install ..." echo "pyenv update ..."
pyenv update
echo "python ${PYENV_PYTHON_VERSION} install ..."
CONFIGURE_OPTS="--enable-shared" pyenv install -f ${PYENV_PYTHON_VERSION} CONFIGURE_OPTS="--enable-shared" pyenv install -f ${PYENV_PYTHON_VERSION}
fi fi

Loading…
Cancel
Save