Skip to content

Commit

Permalink
setup: update pyenv before installing python (commaai#23405)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregjhogan authored Jan 5, 2022
1 parent 25f5147 commit 23346ae
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions update_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
cd $DIR

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
export PATH=$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH
fi
Expand All @@ -13,7 +13,9 @@ export MAKEFLAGS="-j$(nproc)"

PYENV_PYTHON_VERSION=$(cat .python-version)
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}
fi

Expand Down

0 comments on commit 23346ae

Please sign in to comment.