Skip to content

Commit

Permalink
tools/ci/platforms/darwin.sh: Don't use PIP_USER if venv is activated
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yamt committed Dec 13, 2024
1 parent 4a51c21 commit 1881646
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tools/ci/platforms/darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,12 +226,14 @@ ninja_brew() {
}

python_tools() {
# 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
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
Expand Down

0 comments on commit 1881646

Please sign in to comment.