Skip to content

Commit 4036ebb

Browse files
authored
Merge pull request grpc#17283 from jtattermusch/python_interop_37
Run python interop tests with python3.7
2 parents debb6d8 + b0bcfb4 commit 4036ebb

File tree

4 files changed

+23
-34
lines changed

4 files changed

+23
-34
lines changed

Diff for: templates/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile.template

+3-11
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@
1414
# See the License for the specific language governing permissions and
1515
# limitations under the License.
1616

17-
FROM debian:jessie
18-
19-
<%include file="../../apt_get_basic.include"/>
20-
<%include file="../../python_deps.include"/>
21-
# Install pip and virtualenv for Python 3.4
22-
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.4
23-
RUN python3.4 -m pip install virtualenv
17+
<%include file="../../python_stretch.include"/>
2418

25-
<%include file="../../run_tests_addons.include"/>
26-
# Define the default command.
27-
CMD ["bash"]
28-
19+
RUN apt-get update && apt-get -t testing install -y python3.7 python3-all-dev
20+
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7

Diff for: tools/dockerfile/interoptest/grpc_interop_python/Dockerfile

+15-18
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
FROM debian:jessie
16-
15+
FROM debian:stretch
16+
1717
# Install Git and basic packages.
1818
RUN apt-get update && apt-get install -y \
1919
autoconf \
@@ -49,27 +49,24 @@ RUN apt-get update && apt-get install -y \
4949
# Build profiling
5050
RUN apt-get update && apt-get install -y time && apt-get clean
5151

52-
#====================
53-
# Python dependencies
54-
55-
# Install dependencies
56-
57-
RUN apt-get update && apt-get install -y \
58-
python-all-dev \
59-
python3-all-dev \
60-
python-pip
52+
# Google Cloud platform API libraries
53+
RUN apt-get update && apt-get install -y python-pip && apt-get clean
54+
RUN pip install --upgrade google-api-python-client oauth2client
6155

62-
# Install Python packages from PyPI
63-
RUN pip install --upgrade pip==10.0.1
64-
RUN pip install virtualenv
65-
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 twisted==17.5.0
56+
# Install Python 2.7
57+
RUN apt-get update && apt-get install -y python2.7 python-all-dev
58+
RUN curl https://bootstrap.pypa.io/get-pip.py | python2.7
6659

67-
# Install pip and virtualenv for Python 3.4
68-
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.4
69-
RUN python3.4 -m pip install virtualenv
60+
# Add Debian 'testing' repository
61+
RUN echo 'deb http://ftp.de.debian.org/debian testing main' >> /etc/apt/sources.list
62+
RUN echo 'APT::Default-Release "stable";' | tee -a /etc/apt/apt.conf.d/00local
7063

7164

7265
RUN mkdir /var/local/jenkins
7366

7467
# Define the default command.
7568
CMD ["bash"]
69+
70+
71+
RUN apt-get update && apt-get -t testing install -y python3.7 python3-all-dev
72+
RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7

Diff for: tools/dockerfile/interoptest/grpc_interop_python/build_interop.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ cp -r /var/local/jenkins/service_account $HOME || true
2828

2929
cd /var/local/git/grpc
3030

31-
# interop tests only run using python3.4 currently (and python build is slow)
32-
tools/run_tests/run_tests.py -l python --compiler python3.4 -c opt --build_only
31+
# interop tests only run using python3.7 currently (and python build is slow)
32+
tools/run_tests/run_tests.py -l python --compiler python3.7 -c opt --build_only

Diff for: tools/run_tests/run_interop_tests.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -545,13 +545,13 @@ def __init__(self):
545545

546546
def client_cmd(self, args):
547547
return [
548-
'py34_native/bin/python', 'src/python/grpcio_tests/setup.py',
548+
'py37_native/bin/python', 'src/python/grpcio_tests/setup.py',
549549
'run_interop', '--client', '--args="{}"'.format(' '.join(args))
550550
]
551551

552552
def client_cmd_http2interop(self, args):
553553
return [
554-
'py34_native/bin/python',
554+
'py37_native/bin/python',
555555
'src/python/grpcio_tests/tests/http2/negative_http2_client.py',
556556
] + args
557557

@@ -560,7 +560,7 @@ def cloud_to_prod_env(self):
560560

561561
def server_cmd(self, args):
562562
return [
563-
'py34_native/bin/python', 'src/python/grpcio_tests/setup.py',
563+
'py37_native/bin/python', 'src/python/grpcio_tests/setup.py',
564564
'run_interop', '--server', '--args="{}"'.format(' '.join(args))
565565
]
566566

0 commit comments

Comments
 (0)