2020-02-29 14:50:40 -08:00
|
|
|
if [ -z "$OPENPILOT_ENV" ]; then
|
2021-06-24 05:31:28 +09:00
|
|
|
export PYTHONPATH="$HOME/openpilot:$PYTHONPATH"
|
2021-11-17 18:23:05 +08:00
|
|
|
export PATH="$HOME/.pyenv/bin:$PATH"
|
|
|
|
|
|
|
|
|
|
# Pyenv suggests we place the below two lines in .profile before we source
|
|
|
|
|
# .bashrc, but there is no simple way to guarantee we do this correctly
|
|
|
|
|
# programmatically across heterogeneous systems. For end-user convenience,
|
|
|
|
|
# we add the lines here as a workaround.
|
|
|
|
|
# https://github.com/pyenv/pyenv/issues/1906
|
|
|
|
|
export PYENV_ROOT="$HOME/.pyenv"
|
2020-02-29 18:30:44 -08:00
|
|
|
|
|
|
|
|
unamestr=`uname`
|
|
|
|
|
if [[ "$unamestr" == 'Linux' ]]; then
|
2021-06-24 05:31:28 +09:00
|
|
|
eval "$(pyenv init --path)"
|
|
|
|
|
|
2020-02-29 18:30:44 -08:00
|
|
|
eval "$(pyenv virtualenv-init -)"
|
|
|
|
|
elif [[ "$unamestr" == 'Darwin' ]]; then
|
|
|
|
|
# msgq doesn't work on mac
|
|
|
|
|
export ZMQ=1
|
|
|
|
|
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
|
|
|
|
|
fi
|
2020-08-15 11:03:55 +10:00
|
|
|
eval "$(pyenv init -)"
|
2020-02-29 14:50:40 -08:00
|
|
|
|
|
|
|
|
export OPENPILOT_ENV=1
|
|
|
|
|
fi
|