PC: dynamically set PYTHONPATH from real openpilot path (#23322)

* dynamic PYTHONPATH setting based on actual openpilot location

* right above

* fix path

* absolute path all the time

* Revert "absolute path all the time"

This reverts commit c0bc2e08e7.

* Update tools/openpilot_env.sh

Co-authored-by: Willem Melching <willem.melching@gmail.com>

Co-authored-by: Willem Melching <willem.melching@gmail.com>
pull/23353/head
Shane Smiskol 3 years ago committed by GitHub
parent 7cd6a88638
commit fed7cfeef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      tools/openpilot_env.sh

@ -1,5 +1,6 @@
if [ -z "$OPENPILOT_ENV" ]; then
export PYTHONPATH="$HOME/openpilot:$PYTHONPATH"
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

Loading…
Cancel
Save