aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/helper_scripts
diff options
context:
space:
mode:
authorGravatar Matt Kwong <mattkwong@google.com>2018-04-17 16:47:59 -0700
committerGravatar Matt Kwong <mattkwong@google.com>2018-04-17 16:47:59 -0700
commit69f664e7f88f5424c4226b501c7f3c8e9fa35029 (patch)
tree2257d4c0959bf8821f8d1a0904b10006fc5a22bb /tools/run_tests/helper_scripts
parent77c1761f5c3cb498ab55799f9ad02ad6297a3960 (diff)
Upgrade pip for virtualenv Python in build_python.sh
With the upgrade of Kokoro macOS workers to Sierra, not all versions of Python have a pip version new enough to have TLSv1.2. This change should make macOS Python testing more resilient to environment changes.
Diffstat (limited to 'tools/run_tests/helper_scripts')
-rwxr-xr-xtools/run_tests/helper_scripts/build_python.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/run_tests/helper_scripts/build_python.sh b/tools/run_tests/helper_scripts/build_python.sh
index 0b5d3316ad..bd952721ad 100755
--- a/tools/run_tests/helper_scripts/build_python.sh
+++ b/tools/run_tests/helper_scripts/build_python.sh
@@ -142,6 +142,11 @@ fi
true)
VENV_PYTHON=$(script_realpath "$VENV/$VENV_RELATIVE_PYTHON")
+# See https://github.com/grpc/grpc/issues/14815 for more context. We cannot rely
+# on pip to upgrade itself because if pip is too old, it may not have the required
+# TLS version to run `pip install`.
+curl https://bootstrap.pypa.io/get-pip.py | $VENV_PYTHON
+
# pip-installs the directory specified. Used because on MSYS the vanilla Windows
# Python gets confused when parsing paths.
pip_install_dir() {