Files
dragonpilot/tools/openpilot_env.sh
Adeeb Shihadeh 066e3e3626 CI: use ubuntu_setup.sh (#23349)
* CI: use ubuntu_setup.sh

* works?

* need to fix paths

* set paths

* no batman for now

* pyenv version

* rehash after install packages

* unify python install

* revert that

* fix pyenv path

* no pipenv

* flip that

* fix rehash

* skip that

* revert panda
2022-01-02 14:47:16 -08:00

25 lines
840 B
Bash
Executable File

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
# .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"
if [[ "$(uname)" == 'Linux' ]]; then
eval "$(pyenv init --path)"
eval "$(pyenv virtualenv-init -)"
elif [[ "$(uname)" == 'Darwin' ]]; then
# msgq doesn't work on mac
export ZMQ=1
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
fi
eval "$(pyenv init -)"
export OPENPILOT_ENV=1
fi