diff --git a/inc/python b/inc/python index 29e4f38ca4..35f00bb21d 100644 --- a/inc/python +++ b/inc/python @@ -211,9 +211,11 @@ function pip_install { cmd_pip="$cmd_pip install" # Always apply constraints cmd_pip="$cmd_pip -c $REQUIREMENTS_DIR/upper-constraints.txt" - # NOTE(stephenfin): stable-only change to disable build-isolation so that - # we can pin setuptools on these old branches - cmd_pip="$cmd_pip --no-build-isolation" + if [ "${sudo_pip}" == "env" ]; then + # NOTE(stephenfin): stable-only change to disable build-isolation so that + # we can pin setuptools on these old branches + cmd_pip="$cmd_pip --no-build-isolation" + fi $xtrace