tools/ci/platforms/darwin.sh: Don't use PIP_USER if venv is activated

On my environment PIP_USER doesn't work well.
```
error: externally-managed-environment
```
(macOS 15.1.1, x86-64, xcode 16.1)

Also, I prefer to use virtualenv anyway.
This commit is contained in:
YAMAMOTO Takashi 2024-12-12 18:06:01 +09:00 committed by Xiang Xiao
parent a3849afe9f
commit ac3aa0185c

View file

@ -226,12 +226,14 @@ ninja_brew() {
}
python_tools() {
if [ -z "${VIRTUAL_ENV}" ]; then
# Python User Env
export PIP_USER=yes
export PYTHONUSERBASE=${NUTTXTOOLS}/pylocal
echo "export PIP_USER=yes" >> "${NUTTXTOOLS}"/env.sh
echo "export PYTHONUSERBASE=${NUTTXTOOLS}/pylocal" >> "${NUTTXTOOLS}"/env.sh
add_path "${PYTHONUSERBASE}"/bin
fi
if [ "X$osarch" == "Xarm64" ]; then
python3 -m venv --system-site-packages /opt/homebrew