Skip to content

Commit

Permalink
Update Python runtimes and add Python 3.10 runtime
Browse files Browse the repository at this point in the history
Updated Python versions:
  - 3.7.10 → 3.7.12
  - 3.8.10 → 3.8.12
  - 3.9.5 → 3.9.9

Other updated versions:
  - pip: 21.1.2 → 21.3.1
  - PyYAML: 5.4.1 → 6.0
  - OpenSSL: 1.1.1k → 1.1.1m
    Note: I did not touch OpenSSL versions < 1.1.1k

Closes aws#501
  • Loading branch information
michael-k committed Apr 11, 2022
1 parent 282c663 commit d6ccb1d
Show file tree
Hide file tree
Showing 49 changed files with 457 additions and 277 deletions.
23 changes: 18 additions & 5 deletions al2/aarch64/standard/2.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ RUN rbenv install $RUBY_26_VERSION; rm -rf /tmp/*; rbenv global $RUBY_26_VERSION
#**************** END RUBY *****************************************************

#**************** PYTHON *****************************************************
ENV PYTHON_37_VERSION="3.7.10"
ENV PYTHON_PIP_VERSION=21.1.2
ENV PYYAML_VERSION=5.4.1
ENV PYTHON_37_VERSION="3.7.12"
ENV PYTHON_PIP_VERSION=21.3.1
ENV PYYAML_VERSION=6.0
ENV DOCKER_COMPOSE_VERSION="1.26.0"

COPY tools/runtime_configs/python/$PYTHON_37_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_37_VERSION
Expand Down Expand Up @@ -356,7 +356,7 @@ RUN set -ex \
&& chmod +x /usr/local/bin/dind

#Python 3.8
ENV PYTHON_38_VERSION="3.8.10"
ENV PYTHON_38_VERSION="3.8.12"

COPY tools/runtime_configs/python/$PYTHON_38_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_38_VERSION; rm -rf /tmp/*
Expand All @@ -369,7 +369,7 @@ RUN set -ex \
&& docker-compose version

#Python 3.9
ENV PYTHON_39_VERSION="3.9.5"
ENV PYTHON_39_VERSION="3.9.9"

COPY tools/runtime_configs/python/$PYTHON_39_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_39_VERSION; rm -rf /tmp/*
Expand All @@ -381,6 +381,19 @@ RUN set -ex \
&& pip3 install --no-cache-dir "docker-compose==$DOCKER_COMPOSE_VERSION" \
&& docker-compose version

#Python 3.10
ENV PYTHON_310_VERSION="3.10.1"

COPY tools/runtime_configs/python/$PYTHON_310_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_310_VERSION
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_310_VERSION; rm -rf /tmp/*
RUN pyenv global $PYTHON_310_VERSION
RUN set -ex \
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
&& pip3 install --no-cache-dir --upgrade "PyYAML==$PYYAML_VERSION" \
&& pip3 install --no-cache-dir --upgrade 'setuptools==57.4.0' wheel aws-sam-cli awscli boto3 pipenv virtualenv \
&& pip3 install --no-cache-dir "docker-compose==$DOCKER_COMPOSE_VERSION" \
&& docker-compose version

# Node 12
ENV NODE_12_VERSION="12.22.2"

Expand Down
4 changes: 4 additions & 0 deletions al2/aarch64/standard/2.0/runtimes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ runtimes:
- echo "Installing Go version 1.14 ..."
python:
versions:
'3.10':
commands:
- echo "Installing Python version 3.10 ..."
- pyenv global $PYTHON_310_VERSION
3.9:
commands:
- echo "Installing Python version 3.9 ..."
Expand Down
17 changes: 17 additions & 0 deletions al2/aarch64/standard/2.0/tools/runtime_configs/python/3.10.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export PYTHON_CONFIGURE_OPTS="\
--enable-shared
--enable-loadable-sqlite-extensions"

# Don't change below this line.
# https://github.com/pyenv/pyenv/blob/master/plugins/python-build/share/python-build/3.10.1

#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.1m" "https://www.openssl.org/source/openssl-1.1.1m.tar.gz#f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.10.1" "https://www.python.org/ftp/python/3.10.1/Python-3.10.1.tar.xz#a7f1265b6e1a5de1ec5c3ec7019ab53413469934758311e9d240c46e5ae6e177" standard verify_py310 copy_python_gdb ensurepip
else
install_package "Python-3.10.1" "https://www.python.org/ftp/python/3.10.1/Python-3.10.1.tgz#b76117670e7c5064344b9c138e141a377e686b9063f3a8a620ff674fa8ec90d3" standard verify_py310 copy_python_gdb ensurepip
fi
17 changes: 0 additions & 17 deletions al2/aarch64/standard/2.0/tools/runtime_configs/python/3.7.10

This file was deleted.

17 changes: 17 additions & 0 deletions al2/aarch64/standard/2.0/tools/runtime_configs/python/3.7.12
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export PYTHON_CONFIGURE_OPTS="\
--enable-shared
--enable-loadable-sqlite-extensions"

# Don't change below this line.
# https://github.com/pyenv/pyenv/blob/master/plugins/python-build/share/python-build/3.7.12

#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.1m" "https://www.openssl.org/source/openssl-1.1.1m.tar.gz#f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.7.12" "https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tar.xz#f77bf7fb47839f213e5cbf7827281078ea90de7e72b44f10d7ef385ea8c43210" standard verify_py37 copy_python_gdb ensurepip
else
install_package "Python-3.7.12" "https://www.python.org/ftp/python/3.7.12/Python-3.7.12.tgz#33b4daaf831be19219659466d12645f87ecec6eb21d4d9f9711018a7b66cce46" standard verify_py37 copy_python_gdb ensurepip
fi
17 changes: 0 additions & 17 deletions al2/aarch64/standard/2.0/tools/runtime_configs/python/3.8.10

This file was deleted.

17 changes: 17 additions & 0 deletions al2/aarch64/standard/2.0/tools/runtime_configs/python/3.8.12
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export PYTHON_CONFIGURE_OPTS="\
--enable-shared
--enable-loadable-sqlite-extensions"

# Don't change below this line.
# https://github.com/pyenv/pyenv/blob/master/plugins/python-build/share/python-build/3.8.12

#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.1m" "https://www.openssl.org/source/openssl-1.1.1m.tar.gz#f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.8.12" "https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz#b1d3a76420375343b5e8a22fceb1ac65b77193e9ed27146524f0a9db058728ea" standard verify_py38 copy_python_gdb ensurepip
else
install_package "Python-3.8.12" "https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz#316aa33f3b7707d041e73f246efedb297a70898c4b91f127f66dc8d80c596f1a" standard verify_py38 copy_python_gdb ensurepip
fi
17 changes: 0 additions & 17 deletions al2/aarch64/standard/2.0/tools/runtime_configs/python/3.9.5

This file was deleted.

17 changes: 17 additions & 0 deletions al2/aarch64/standard/2.0/tools/runtime_configs/python/3.9.9
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export PYTHON_CONFIGURE_OPTS="\
--enable-shared
--enable-loadable-sqlite-extensions"

# Don't change below this line.
# https://github.com/pyenv/pyenv/blob/master/plugins/python-build/share/python-build/3.9.9

#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.1m" "https://www.openssl.org/source/openssl-1.1.1m.tar.gz#f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.9.9" "https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tar.xz#06828c04a573c073a4e51c4292a27c1be4ae26621c3edc7cf9318418ce3b6d27" standard verify_py39 copy_python_gdb ensurepip
else
install_package "Python-3.9.9" "https://www.python.org/ftp/python/3.9.9/Python-3.9.9.tgz#2cc7b67c1f3f66c571acc42479cdf691d8ed6b47bee12c9b68430413a17a44ea" standard verify_py39 copy_python_gdb ensurepip
fi
21 changes: 16 additions & 5 deletions al2/x86_64/standard/2.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -327,9 +327,9 @@ RUN rbenv install $RUBY_26_VERSION && rm -rf /tmp/* && rbenv global $RUBY_26_VER
#**************** END RUBY *****************************************************

#**************** PYTHON *****************************************************
ENV PYTHON_37_VERSION="3.7.10"
ENV PYTHON_PIP_VERSION=21.1.2
ENV PYYAML_VERSION=5.4.1
ENV PYTHON_37_VERSION="3.7.12"
ENV PYTHON_PIP_VERSION=21.3.1
ENV PYYAML_VERSION=6.0

COPY tools/runtime_configs/python/$PYTHON_37_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_37_VERSION
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_37_VERSION && rm -rf /tmp/*
Expand Down Expand Up @@ -397,7 +397,7 @@ RUN set -ex \
&& docker-compose version

#Python 3.8
ENV PYTHON_38_VERSION="3.8.10"
ENV PYTHON_38_VERSION="3.8.12"

COPY tools/runtime_configs/python/$PYTHON_38_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_38_VERSION && rm -rf /tmp/*
Expand All @@ -408,7 +408,7 @@ RUN set -ex \
&& pip3 install --no-cache-dir --upgrade 'setuptools==57.4.0' wheel aws-sam-cli awscli boto3 pipenv virtualenv

#Python 3.9
ENV PYTHON_39_VERSION="3.9.5"
ENV PYTHON_39_VERSION="3.9.9"

COPY tools/runtime_configs/python/$PYTHON_39_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_39_VERSION && rm -rf /tmp/*
Expand All @@ -418,6 +418,17 @@ RUN set -ex \
&& pip3 install --no-cache-dir --upgrade "PyYAML==$PYYAML_VERSION" \
&& pip3 install --no-cache-dir --upgrade 'setuptools==57.4.0' wheel aws-sam-cli awscli boto3 pipenv virtualenv

#Python 3.10
ENV PYTHON_310_VERSION="3.10.1"

COPY tools/runtime_configs/python/$PYTHON_310_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_310_VERSION
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_310_VERSION; rm -rf /tmp/*
RUN pyenv global $PYTHON_310_VERSION
RUN set -ex \
&& pip3 install --no-cache-dir --upgrade --force-reinstall "pip==$PYTHON_PIP_VERSION" \
&& pip3 install --no-cache-dir --upgrade "PyYAML==$PYYAML_VERSION" \
&& pip3 install --no-cache-dir --upgrade 'setuptools==57.4.0' wheel aws-sam-cli awscli boto3 pipenv virtualenv

# Node 12
ENV NODE_12_VERSION="12.16.1"

Expand Down
4 changes: 4 additions & 0 deletions al2/x86_64/standard/2.0/runtimes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ runtimes:
commands:
- echo "Installing Python version 3.9 ..."
- pyenv global $PYTHON_39_VERSION
'3.10':
commands:
- echo "Installing Python version 3.10 ..."
- pyenv global $PYTHON_310_VERSION
php:
versions:
7.3:
Expand Down
17 changes: 17 additions & 0 deletions al2/x86_64/standard/2.0/tools/runtime_configs/python/3.10.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export PYTHON_CONFIGURE_OPTS="\
--enable-shared
--enable-loadable-sqlite-extensions"

# Don't change below this line.
# https://github.com/pyenv/pyenv/blob/master/plugins/python-build/share/python-build/3.10.1

#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.1m" "https://www.openssl.org/source/openssl-1.1.1m.tar.gz#f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.10.1" "https://www.python.org/ftp/python/3.10.1/Python-3.10.1.tar.xz#a7f1265b6e1a5de1ec5c3ec7019ab53413469934758311e9d240c46e5ae6e177" standard verify_py310 copy_python_gdb ensurepip
else
install_package "Python-3.10.1" "https://www.python.org/ftp/python/3.10.1/Python-3.10.1.tgz#b76117670e7c5064344b9c138e141a377e686b9063f3a8a620ff674fa8ec90d3" standard verify_py310 copy_python_gdb ensurepip
fi
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.0j" "https://www.openssl.org/source/old/1.1.0/openssl-1.1.0j.tar.gz#31bec6c203ce1a8e93d5994f4ed304c63ccf07676118b6634edded12ad1b3246" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.7.10" "https://www.python.org/ftp/python/3.7.10/Python-3.7.10.tar.xz#f8d82e7572c86ec9d55c8627aae5040124fd2203af400c383c821b980306ee6b" standard verify_py37 copy_python_gdb ensurepip
install_package "Python-3.7.10" "https://www.python.org/ftp/python/3.7.10/Python-3.7.10.tar.xz#f77bf7fb47839f213e5cbf7827281078ea90de7e72b44f10d7ef385ea8c43210" standard verify_py37 copy_python_gdb ensurepip
else
install_package "Python-3.7.10" "https://www.python.org/ftp/python/3.7.10/Python-3.7.10.tgz#c9649ad84dc3a434c8637df6963100b2e5608697f9ba56d82e3809e4148e0975" standard verify_py37 copy_python_gdb ensurepip
install_package "Python-3.7.10" "https://www.python.org/ftp/python/3.7.10/Python-3.7.10.tgz#33b4daaf831be19219659466d12645f87ecec6eb21d4d9f9711018a7b66cce46" standard verify_py37 copy_python_gdb ensurepip
fi

17 changes: 0 additions & 17 deletions al2/x86_64/standard/2.0/tools/runtime_configs/python/3.8.10

This file was deleted.

17 changes: 17 additions & 0 deletions al2/x86_64/standard/2.0/tools/runtime_configs/python/3.8.12
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export PYTHON_CONFIGURE_OPTS="\
--enable-shared
--enable-loadable-sqlite-extensions"

# Don't change below this line.
# https://github.com/pyenv/pyenv/blob/master/plugins/python-build/share/python-build/3.8.12

#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.1m" "https://www.openssl.org/source/openssl-1.1.1m.tar.gz#f89199be8b23ca45fc7cb9f1d8d3ee67312318286ad030f5316aca6462db6c96" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.0" "https://ftpmirror.gnu.org/readline/readline-8.0.tar.gz#e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.8.12" "https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tar.xz#b1d3a76420375343b5e8a22fceb1ac65b77193e9ed27146524f0a9db058728ea" standard verify_py38 copy_python_gdb ensurepip
else
install_package "Python-3.8.12" "https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz#316aa33f3b7707d041e73f246efedb297a70898c4b91f127f66dc8d80c596f1a" standard verify_py38 copy_python_gdb ensurepip
fi
17 changes: 0 additions & 17 deletions al2/x86_64/standard/2.0/tools/runtime_configs/python/3.9.5

This file was deleted.

Loading

0 comments on commit d6ccb1d

Please sign in to comment.