From 151e632bac75f6179043655ae54aa6f835508e72 Mon Sep 17 00:00:00 2001 From: Adam Cozzette Date: Thu, 23 Sep 2021 15:08:32 -0700 Subject: [PATCH] Fix dist install test by ensuring that we use Python 3 (#9011) * Fix dist install test by ensuring that we use Python 3 Now that we have dropped Python 2 support, we need to make sure this install test uses Python 3. * Update Docker image to install Python 3 version of setuptools * Run pip3 instead of pip --- kokoro/linux/dockerfile/test/java_stretch/Dockerfile | 4 ++-- tests.sh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/kokoro/linux/dockerfile/test/java_stretch/Dockerfile b/kokoro/linux/dockerfile/test/java_stretch/Dockerfile index 3e72046f47..b9f562a2b4 100644 --- a/kokoro/linux/dockerfile/test/java_stretch/Dockerfile +++ b/kokoro/linux/dockerfile/test/java_stretch/Dockerfile @@ -24,7 +24,7 @@ RUN apt-get update && apt-get install -y \ maven \ openjdk-8-jdk \ # Python dependencies - python-setuptools \ - python-pip \ + python3-setuptools \ + python3-pip \ virtualenv \ && apt-get clean diff --git a/tests.sh b/tests.sh index 1955b7bdf9..5dc2eb6ff8 100755 --- a/tests.sh +++ b/tests.sh @@ -112,8 +112,8 @@ build_dist_install() { virtualenv --no-site-packages venv source venv/bin/activate pushd python - python setup.py clean build sdist - pip install dist/protobuf-*.tar.gz + python3 setup.py clean build sdist + pip3 install dist/protobuf-*.tar.gz popd deactivate rm -rf python/venv