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
This commit is contained in:
Adam Cozzette 2021-09-23 15:08:32 -07:00
parent 2fffff8320
commit 151e632bac
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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