diff --git a/templates/tools/dockerfile/compile_python_36.include b/templates/tools/dockerfile/compile_python_36.include index e8983db334f..af4d73e9f6b 100644 --- a/templates/tools/dockerfile/compile_python_36.include +++ b/templates/tools/dockerfile/compile_python_36.include @@ -5,11 +5,15 @@ RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev RUN apt-get update && apt-get install -y jq build-essential libffi-dev RUN cd /tmp && ${'\\'} -wget -q https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz && ${'\\'} -tar xzvf Python-3.6.9.tgz && ${'\\'} -cd Python-3.6.9 && ${'\\'} -./configure && ${'\\'} -make install + wget -q https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tgz && ${'\\'} + tar xzvf Python-3.6.9.tgz && ${'\\'} + cd Python-3.6.9 && ${'\\'} + ./configure && ${'\\'} + make install + +RUN cd /tmp && ${'\\'} + echo "ff7cdaef4846c89c1ec0d7b709bbd54d Python-3.6.9.tgz" > checksum.md5 && ${'\\'} + md5sum -c checksum.md5 RUN python3.6 -m ensurepip && ${'\\'} - python3.6 -m pip install coverage \ No newline at end of file + python3.6 -m pip install coverage diff --git a/templates/tools/dockerfile/compile_python_38.include b/templates/tools/dockerfile/compile_python_38.include new file mode 100644 index 00000000000..30337e0ecb7 --- /dev/null +++ b/templates/tools/dockerfile/compile_python_38.include @@ -0,0 +1,19 @@ +#================= +# Compile CPython 3.8.0b4 from source + +RUN apt-get update && apt-get install -y zlib1g-dev libssl-dev +RUN apt-get update && apt-get install -y jq build-essential libffi-dev + +RUN cd /tmp && ${'\\'} + wget -q https://www.python.org/ftp/python/3.8.0/Python-3.8.0b4.tgz && ${'\\'} + tar xzvf Python-3.8.0b4.tgz && ${'\\'} + cd Python-3.8.0b4 && ${'\\'} + ./configure && ${'\\'} + make install + +RUN cd /tmp && ${'\\'} + echo "b8f4f897df967014ddb42033b90c3058 Python-3.8.0b4.tgz" > checksum.md5 && ${'\\'} + md5sum -c checksum.md5 + +RUN python3.8 -m ensurepip && ${'\\'} + python3.8 -m pip install coverage diff --git a/templates/tools/dockerfile/test/python_stretch_3.8_x64/Dockerfile.template b/templates/tools/dockerfile/test/python_stretch_3.8_x64/Dockerfile.template index 841a7f51b51..b0098fda0cc 100644 --- a/templates/tools/dockerfile/test/python_stretch_3.8_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/python_stretch_3.8_x64/Dockerfile.template @@ -16,16 +16,4 @@ # limitations under the License. <%include file="../../python_stretch.include"/> - RUN apt-get install -y jq zlib1g-dev libssl-dev - - RUN apt-get install -y jq build-essential libffi-dev - - RUN cd /tmp && ${'\\'} - wget -q https://github.com/python/cpython/archive/v3.8.0b3.tar.gz && ${'\\'} - tar xzvf v3.8.0b3.tar.gz && ${'\\'} - cd cpython-3.8.0b3 && ${'\\'} - ./configure && ${'\\'} - make install - - RUN python3.8 -m ensurepip && ${'\\'} - python3.8 -m pip install coverage + <%include file="../../compile_python_38.include"/> diff --git a/templates/tools/dockerfile/test/python_stretch_default_x64/Dockerfile.template b/templates/tools/dockerfile/test/python_stretch_default_x64/Dockerfile.template index 8f8bea1eb50..ccb88e75302 100644 --- a/templates/tools/dockerfile/test/python_stretch_default_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/python_stretch_default_x64/Dockerfile.template @@ -16,16 +16,9 @@ <%include file="../../python_stretch.include"/> <%include file="../../compile_python_36.include"/> - - RUN cd /tmp && ${'\\'} - echo "ff7cdaef4846c89c1ec0d7b709bbd54d Python-3.6.9.tgz" > checksum.md5 && ${'\\'} - md5sum -c checksum.md5 - + RUN apt-get update && apt-get -t buster install -y python3.7 python3-all-dev RUN curl https://bootstrap.pypa.io/get-pip.py | python3.7 # for Python test coverage reporting RUN python3.7 -m pip install coverage - - RUN python3.6 -m ensurepip && ${'\\'} - python3.6 -m pip install coverage