mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
tools/setup: do not change global state (#22735)
* tools/setup: do not change global state 1. download packages in the venv 2. never change global python version * update_requirements.sh: install to system if used by comma employees * bump pip & pipenv versions * no --upgrade * run pre-commmit install in venv * for consistency Co-authored-by: predicate@bonzo <noreply@example.com> Co-authored-by: Willem Melching <willem.melching@gmail.com> old-commit-hash: 1d55f2f23e31dd64568d729ef33325cf229fdf51
This commit is contained in:
+2
-3
@@ -62,14 +62,13 @@ fi
|
||||
# install python
|
||||
PYENV_PYTHON_VERSION=$(cat $OP_ROOT/.python-version)
|
||||
pyenv install -s ${PYENV_PYTHON_VERSION}
|
||||
pyenv global ${PYENV_PYTHON_VERSION}
|
||||
pyenv rehash
|
||||
eval "$(pyenv init -)"
|
||||
|
||||
pip install pipenv==2020.8.13
|
||||
pipenv install --system --deploy
|
||||
pipenv install --dev --deploy
|
||||
|
||||
echo
|
||||
echo "---- FINISH OPENPILOT SETUP ----"
|
||||
echo "Configure your active shell env by running:"
|
||||
echo "source $RC_FILE"
|
||||
echo "source $RC_FILE"
|
||||
|
||||
@@ -136,14 +136,13 @@ git submodule update
|
||||
PYENV_PYTHON_VERSION=$(cat $OP_ROOT/.python-version)
|
||||
PATH=$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH
|
||||
pyenv install -s ${PYENV_PYTHON_VERSION}
|
||||
pyenv global ${PYENV_PYTHON_VERSION}
|
||||
pyenv rehash
|
||||
eval "$(pyenv init -)"
|
||||
|
||||
# **** in python env ****
|
||||
pip install --upgrade pip==20.2.4
|
||||
pip install pipenv==2020.8.13
|
||||
pipenv install --dev --system --deploy
|
||||
pip install pip==21.3.1
|
||||
pip install pipenv==2021.5.29
|
||||
pipenv install --dev --deploy
|
||||
|
||||
echo
|
||||
echo "---- FINISH OPENPILOT SETUP ----"
|
||||
|
||||
+14
-7
@@ -28,18 +28,25 @@ if ! command -v pipenv &> /dev/null; then
|
||||
fi
|
||||
|
||||
echo "update pip"
|
||||
pip install --upgrade pip
|
||||
pip install pipenv
|
||||
pip install pip==21.3.1
|
||||
pip install pipenv==2021.5.29
|
||||
|
||||
echo "pip packages install ..."
|
||||
[ -d "./xx" ] && export PIPENV_PIPFILE=./xx/Pipfile
|
||||
pipenv install --dev --deploy --system
|
||||
if [ -d "./xx" ]; then
|
||||
export PIPENV_PIPFILE=./xx/Pipfile
|
||||
pipenv install --system --dev --deploy
|
||||
RUN=""
|
||||
else
|
||||
pipenv install --dev --deploy
|
||||
RUN="pipenv run"
|
||||
fi
|
||||
|
||||
# update shims for newly installed executables (e.g. scons)
|
||||
pyenv rehash
|
||||
|
||||
echo "precommit install ..."
|
||||
pre-commit install
|
||||
$RUN pre-commit install
|
||||
|
||||
# for internal comma repos
|
||||
[ -d "./xx" ] && (cd xx && pre-commit install)
|
||||
[ -d "./notebooks" ] && (cd notebooks && pre-commit install)
|
||||
[ -d "./xx" ] && (cd xx && $RUN pre-commit install)
|
||||
[ -d "./notebooks" ] && (cd notebooks && $RUN pre-commit install)
|
||||
|
||||
Reference in New Issue
Block a user