mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-07-15 22:32:11 +08:00
setup cleanup (#29419)
* setup cleanup * update ci * update ci * export variables for mac os * check env * what is in the profile script? * install pyenv the same everywhere * temporarily disable brew cache * temporarily disable brew cache * try fixing pyenv virtualenv-init * try this * inject shims path earlier * try alternate install method * switch back to brew install * try eval "$(pyenv init --path)" * add eval "\$(pyenv init --path)" old-commit-hash: ad32816fd6bdd744e7f596209822707494d3ba5e
This commit is contained in:
@@ -14,21 +14,19 @@ if ! command -v "pyenv" > /dev/null 2>&1; then
|
||||
echo "pyenv install ..."
|
||||
curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-installer | bash
|
||||
|
||||
echo -e "\n. ~/.pyenvrc" >> $RC_FILE
|
||||
cat <<EOF > "${HOME}/.pyenvrc"
|
||||
if [ -z "\$PYENV_ROOT" ]; then
|
||||
export PATH=\$HOME/.pyenv/bin:\$HOME/.pyenv/shims:\$PATH
|
||||
export PYENV_ROOT="\$HOME/.pyenv"
|
||||
eval "\$(pyenv init --path)"
|
||||
eval "\$(pyenv init -)"
|
||||
eval "\$(pyenv virtualenv-init -)"
|
||||
fi
|
||||
EOF
|
||||
echo -e "\nsource ~/.pyenvrc" >> $RC_FILE
|
||||
|
||||
# setup now without restarting shell
|
||||
export PATH=$HOME/.pyenv/bin:$HOME/.pyenv/shims:$PATH
|
||||
export PYENV_ROOT="$HOME/.pyenv"
|
||||
eval "$(pyenv init -)"
|
||||
eval "$(pyenv virtualenv-init -)"
|
||||
# activate pyenv now
|
||||
source $RC_FILE
|
||||
fi
|
||||
|
||||
export MAKEFLAGS="-j$(nproc)"
|
||||
@@ -52,6 +50,12 @@ pip install poetry==1.5.1
|
||||
poetry config virtualenvs.prefer-active-python true --local
|
||||
|
||||
echo "PYTHONPATH=${PWD}" > $ROOT/.env
|
||||
if [[ "$(uname)" == 'Darwin' ]]; then
|
||||
echo "# msgq doesn't work on mac" >> $ROOT/.env
|
||||
echo "export ZMQ=1" >> $ROOT/.env
|
||||
echo "export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES" >> $ROOT/.env
|
||||
fi
|
||||
|
||||
poetry self add poetry-dotenv-plugin@^0.1.0
|
||||
|
||||
echo "pip packages install..."
|
||||
|
||||
Reference in New Issue
Block a user