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
diff --git a/kokoro/linux/dockerfile/test/java_stretch/Dockerfile b/kokoro/linux/dockerfile/test/java_stretch/Dockerfile
index 3e72046..b9f562a 100644
--- a/kokoro/linux/dockerfile/test/java_stretch/Dockerfile
+++ b/kokoro/linux/dockerfile/test/java_stretch/Dockerfile
@@ -24,7 +24,7 @@
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 1955b7b..5dc2eb6 100755
--- a/tests.sh
+++ b/tests.sh
@@ -112,8 +112,8 @@
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