[Fix test] Fix ensurepip missing (#35437)

Passed manual runs:
* [grpc/core/master/linux/grpc_interop_tocloud](https://fusion2.corp.google.com/invocations/70b9a382-03b0-46ce-9181-cd3382ae9ee7) (Ruby failed)
* [grpc/core/master/linux/arm64/grpc_basictests_python](https://fusion2.corp.google.com/invocations/279d959a-3d3f-4d0c-a0a3-712fefca14fe/targets)
<!--

If you know who should review your pull request, please assign it to that
person, otherwise the pull request would get assigned randomly.

If your pull request is for a specific language, please add the appropriate
lang label.

-->

Closes #35437

COPYBARA_INTEGRATE_REVIEW=https://github.com/grpc/grpc/pull/35437 from XuanWang-Amos:fix_ensurepip_missing 8c572dcfa5
PiperOrigin-RevId: 595520790
pull/35435/head^2
Xuan Wang 11 months ago committed by Copybara-Service
parent bd1eb96b5b
commit 47aa2fc59b
  1. 8
      tools/run_tests/helper_scripts/build_python.sh

@ -124,9 +124,9 @@ if [[ "$(inside_venv)" ]]; then
else
# Instantiate the virtualenv from the Python version passed in.
$PYTHON -m pip install --user virtualenv==20.25.0
# Use --no-seed to prevent virtualenv from installing seed packages.
# Otherwise it might not find cython module while building grpcio.
$PYTHON -m virtualenv --no-seed "$VENV"
# Skip wheel and setuptools and manually install later. Otherwise we might
# not find cython module while building grpcio.
$PYTHON -m virtualenv --no-wheel --no-setuptools "$VENV"
VENV_PYTHON="$(pwd)/$VENV/$VENV_RELATIVE_PYTHON"
fi
@ -134,7 +134,7 @@ pip_install() {
$VENV_PYTHON -m pip install "$@"
}
$VENV_PYTHON -m ensurepip --upgrade
pip_install --upgrade pip
pip_install --upgrade wheel
pip_install --upgrade setuptools==66.1.0

Loading…
Cancel
Save