From 3e5a2730227603e06e2b0df657dd7a3e874a6bd1 Mon Sep 17 00:00:00 2001 From: Greg Hogan Date: Mon, 3 Jan 2022 20:15:10 -0800 Subject: [PATCH] tools: configure PYTHONPATH in pipenv (#23361) * automatically set PYTHONPATH in pipenv * remove other place this was set --- .gitignore | 1 + tools/openpilot_env.sh | 2 -- update_requirements.sh | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 3e87dcc433..06c6117b18 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ venv/ +.env .clang-format .DS_Store .tags diff --git a/tools/openpilot_env.sh b/tools/openpilot_env.sh index f8ce6901c2..ac73cc8305 100755 --- a/tools/openpilot_env.sh +++ b/tools/openpilot_env.sh @@ -1,6 +1,4 @@ if [ -z "$OPENPILOT_ENV" ]; then - OP_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")"/.. && pwd)" - export PYTHONPATH="$OP_ROOT:$PYTHONPATH" export PATH="$HOME/.pyenv/bin:$PATH" # Pyenv suggests we place the below two lines in .profile before we source diff --git a/update_requirements.sh b/update_requirements.sh index fe35c4eec6..bece43a51a 100755 --- a/update_requirements.sh +++ b/update_requirements.sh @@ -32,6 +32,7 @@ if [ -d "./xx" ]; then fi if [ -z "$PIPENV_SYSTEM" ]; then + echo "PYTHONPATH=${PWD}" > .env RUN="pipenv run" else RUN=""