From b7b91ef359a740a91caeabce414ce4ee70fd2b23 Mon Sep 17 00:00:00 2001 From: Joseph Ferguson Date: Mon, 2 Oct 2023 11:56:26 -0700 Subject: [PATCH 1/2] Add python 3.12 GA release --- {3.12-rc => 3.12}/alpine3.17/Dockerfile | 2 +- {3.12-rc => 3.12}/alpine3.18/Dockerfile | 2 +- {3.12-rc => 3.12}/bookworm/Dockerfile | 2 +- {3.12-rc => 3.12}/bullseye/Dockerfile | 2 +- {3.12-rc => 3.12}/slim-bookworm/Dockerfile | 2 +- {3.12-rc => 3.12}/slim-bullseye/Dockerfile | 2 +- {3.12-rc => 3.12}/windows/windowsservercore-1809/Dockerfile | 2 +- .../windows/windowsservercore-ltsc2022/Dockerfile | 2 +- generate-stackbrew-library.sh | 2 +- versions.json | 4 ++-- 10 files changed, 11 insertions(+), 11 deletions(-) rename {3.12-rc => 3.12}/alpine3.17/Dockerfile (99%) rename {3.12-rc => 3.12}/alpine3.18/Dockerfile (99%) rename {3.12-rc => 3.12}/bookworm/Dockerfile (99%) rename {3.12-rc => 3.12}/bullseye/Dockerfile (99%) rename {3.12-rc => 3.12}/slim-bookworm/Dockerfile (99%) rename {3.12-rc => 3.12}/slim-bullseye/Dockerfile (99%) rename {3.12-rc => 3.12}/windows/windowsservercore-1809/Dockerfile (99%) rename {3.12-rc => 3.12}/windows/windowsservercore-ltsc2022/Dockerfile (99%) diff --git a/3.12-rc/alpine3.17/Dockerfile b/3.12/alpine3.17/Dockerfile similarity index 99% rename from 3.12-rc/alpine3.17/Dockerfile rename to 3.12/alpine3.17/Dockerfile index 7c5d59276..e87b1e46d 100644 --- a/3.12-rc/alpine3.17/Dockerfile +++ b/3.12/alpine3.17/Dockerfile @@ -21,7 +21,7 @@ RUN set -eux; \ ; ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.0rc3 +ENV PYTHON_VERSION 3.12.0 RUN set -eux; \ \ diff --git a/3.12-rc/alpine3.18/Dockerfile b/3.12/alpine3.18/Dockerfile similarity index 99% rename from 3.12-rc/alpine3.18/Dockerfile rename to 3.12/alpine3.18/Dockerfile index 063de40f4..618dbad76 100644 --- a/3.12-rc/alpine3.18/Dockerfile +++ b/3.12/alpine3.18/Dockerfile @@ -21,7 +21,7 @@ RUN set -eux; \ ; ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.0rc3 +ENV PYTHON_VERSION 3.12.0 RUN set -eux; \ \ diff --git a/3.12-rc/bookworm/Dockerfile b/3.12/bookworm/Dockerfile similarity index 99% rename from 3.12-rc/bookworm/Dockerfile rename to 3.12/bookworm/Dockerfile index 584ab4e67..26aa9157f 100644 --- a/3.12-rc/bookworm/Dockerfile +++ b/3.12/bookworm/Dockerfile @@ -24,7 +24,7 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.0rc3 +ENV PYTHON_VERSION 3.12.0 RUN set -eux; \ \ diff --git a/3.12-rc/bullseye/Dockerfile b/3.12/bullseye/Dockerfile similarity index 99% rename from 3.12-rc/bullseye/Dockerfile rename to 3.12/bullseye/Dockerfile index e4db41954..c151c5652 100644 --- a/3.12-rc/bullseye/Dockerfile +++ b/3.12/bullseye/Dockerfile @@ -24,7 +24,7 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.0rc3 +ENV PYTHON_VERSION 3.12.0 RUN set -eux; \ \ diff --git a/3.12-rc/slim-bookworm/Dockerfile b/3.12/slim-bookworm/Dockerfile similarity index 99% rename from 3.12-rc/slim-bookworm/Dockerfile rename to 3.12/slim-bookworm/Dockerfile index 1c58c3d22..2866d39b5 100644 --- a/3.12-rc/slim-bookworm/Dockerfile +++ b/3.12/slim-bookworm/Dockerfile @@ -24,7 +24,7 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.0rc3 +ENV PYTHON_VERSION 3.12.0 RUN set -eux; \ \ diff --git a/3.12-rc/slim-bullseye/Dockerfile b/3.12/slim-bullseye/Dockerfile similarity index 99% rename from 3.12-rc/slim-bullseye/Dockerfile rename to 3.12/slim-bullseye/Dockerfile index f65fa8866..bcac59f1e 100644 --- a/3.12-rc/slim-bullseye/Dockerfile +++ b/3.12/slim-bullseye/Dockerfile @@ -24,7 +24,7 @@ RUN set -eux; \ rm -rf /var/lib/apt/lists/* ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 -ENV PYTHON_VERSION 3.12.0rc3 +ENV PYTHON_VERSION 3.12.0 RUN set -eux; \ \ diff --git a/3.12-rc/windows/windowsservercore-1809/Dockerfile b/3.12/windows/windowsservercore-1809/Dockerfile similarity index 99% rename from 3.12-rc/windows/windowsservercore-1809/Dockerfile rename to 3.12/windows/windowsservercore-1809/Dockerfile index edd03a915..ee9bf5982 100644 --- a/3.12-rc/windows/windowsservercore-1809/Dockerfile +++ b/3.12/windows/windowsservercore-1809/Dockerfile @@ -11,7 +11,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref # https://github.com/docker-library/python/pull/557 ENV PYTHONIOENCODING UTF-8 -ENV PYTHON_VERSION 3.12.0rc3 +ENV PYTHON_VERSION 3.12.0 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ diff --git a/3.12-rc/windows/windowsservercore-ltsc2022/Dockerfile b/3.12/windows/windowsservercore-ltsc2022/Dockerfile similarity index 99% rename from 3.12-rc/windows/windowsservercore-ltsc2022/Dockerfile rename to 3.12/windows/windowsservercore-ltsc2022/Dockerfile index 760a88baa..3a244a531 100644 --- a/3.12-rc/windows/windowsservercore-ltsc2022/Dockerfile +++ b/3.12/windows/windowsservercore-ltsc2022/Dockerfile @@ -11,7 +11,7 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref # https://github.com/docker-library/python/pull/557 ENV PYTHONIOENCODING UTF-8 -ENV PYTHON_VERSION 3.12.0rc3 +ENV PYTHON_VERSION 3.12.0 RUN $url = ('https://www.python.org/ftp/python/{0}/python-{1}-amd64.exe' -f ($env:PYTHON_VERSION -replace '[a-z]+[0-9]*$', ''), $env:PYTHON_VERSION); \ Write-Host ('Downloading {0} ...' -f $url); \ diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 227dfaeb4..8bc5f2f99 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -2,7 +2,7 @@ set -Eeuo pipefail declare -A aliases=( - [3.11]='3 latest' + [3.12]='3 latest' ) self="$(basename "$BASH_SOURCE")" diff --git a/versions.json b/versions.json index dc3ef8ffc..931fdfadf 100644 --- a/versions.json +++ b/versions.json @@ -45,7 +45,7 @@ ], "version": "3.11.6" }, - "3.12-rc": { + "3.12": { "get-pip": { "sha256": "45a2bb8bf2bb5eff16fdd00faef6f29731831c7c59bd9fc2bf1f3bed511ff1fe", "url": "https://github.com/pypa/get-pip/raw/9af82b715db434abb94a0a6f3569f43e72157346/public/get-pip.py", @@ -64,7 +64,7 @@ "windows/windowsservercore-ltsc2022", "windows/windowsservercore-1809" ], - "version": "3.12.0rc3" + "version": "3.12.0" }, "3.7": { "get-pip": { From 7eefa0c4911bcf998ff5f880df51dc7f8bbf6dec Mon Sep 17 00:00:00 2001 From: Joseph Ferguson Date: Mon, 2 Oct 2023 12:04:51 -0700 Subject: [PATCH 2/2] Drop eol 3.7 https://devguide.python.org/versions/ --- 3.7/alpine3.17/Dockerfile | 194 ------------------------------- 3.7/alpine3.18/Dockerfile | 194 ------------------------------- 3.7/bookworm/Dockerfile | 164 --------------------------- 3.7/bullseye/Dockerfile | 164 --------------------------- 3.7/slim-bookworm/Dockerfile | 207 ---------------------------------- 3.7/slim-bullseye/Dockerfile | 207 ---------------------------------- Dockerfile-linux.template | 54 +-------- generate-stackbrew-library.sh | 2 +- versions.json | 22 ---- versions.sh | 4 +- 10 files changed, 5 insertions(+), 1207 deletions(-) delete mode 100644 3.7/alpine3.17/Dockerfile delete mode 100644 3.7/alpine3.18/Dockerfile delete mode 100644 3.7/bookworm/Dockerfile delete mode 100644 3.7/bullseye/Dockerfile delete mode 100644 3.7/slim-bookworm/Dockerfile delete mode 100644 3.7/slim-bullseye/Dockerfile diff --git a/3.7/alpine3.17/Dockerfile b/3.7/alpine3.17/Dockerfile deleted file mode 100644 index 135ce6008..000000000 --- a/3.7/alpine3.17/Dockerfile +++ /dev/null @@ -1,194 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.17 - -# ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH - -# http://bugs.python.org/issue19846 -# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. -ENV LANG C.UTF-8 - -# runtime dependencies -RUN set -eux; \ - apk add --no-cache \ - ca-certificates \ - tzdata \ - ; - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.7.17 - -RUN set -eux; \ - \ - apk add --no-cache --virtual .build-deps \ - gnupg \ - tar \ - xz \ - \ - bluez-dev \ - bzip2-dev \ - dpkg-dev dpkg \ - expat-dev \ - findutils \ - gcc \ - gdbm-dev \ - libc-dev \ - libffi-dev \ - libnsl-dev \ - libtirpc-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl-dev \ - pax-utils \ - readline-dev \ - sqlite-dev \ - tcl-dev \ - tk \ - tk-dev \ - util-linux-dev \ - xz-dev \ - zlib-dev \ - ; \ - \ - wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ - wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; \ - GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \ - gpg --batch --verify python.tar.xz.asc python.tar.xz; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" python.tar.xz.asc; \ - mkdir -p /usr/src/python; \ - tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \ - rm python.tar.xz; \ - \ - cd /usr/src/python; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --enable-loadable-sqlite-extensions \ - --enable-optimizations \ - --enable-option-checking=fatal \ - --enable-shared \ - --with-system-expat \ - --without-ensurepip \ - ; \ - nproc="$(nproc)"; \ -# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() -# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 - EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ -# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - '; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - ; \ -# https://github.com/docker-library/python/issues/784 -# prevent accidental usage of a system installed libpython of the same version - rm python; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - python \ - ; \ - make install; \ - \ - cd /; \ - rm -rf /usr/src/python; \ - \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - -o \( -type f -a -name 'wininst-*.exe' \) \ - \) -exec rm -rf '{}' + \ - ; \ - \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - | xargs -rt apk add --no-network --virtual .python-rundeps \ - ; \ - apk del --no-network .build-deps; \ - \ - python3 --version - -# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) -RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ - dst="$(echo "$src" | tr -d 3)"; \ - [ -s "/usr/local/bin/$src" ]; \ - [ ! -e "/usr/local/bin/$dst" ]; \ - ln -svT "$src" "/usr/local/bin/$dst"; \ - done - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 57.5.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/9af82b715db434abb94a0a6f3569f43e72157346/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 45a2bb8bf2bb5eff16fdd00faef6f29731831c7c59bd9fc2bf1f3bed511ff1fe - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] diff --git a/3.7/alpine3.18/Dockerfile b/3.7/alpine3.18/Dockerfile deleted file mode 100644 index 90a6adebe..000000000 --- a/3.7/alpine3.18/Dockerfile +++ /dev/null @@ -1,194 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM alpine:3.18 - -# ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH - -# http://bugs.python.org/issue19846 -# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. -ENV LANG C.UTF-8 - -# runtime dependencies -RUN set -eux; \ - apk add --no-cache \ - ca-certificates \ - tzdata \ - ; - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.7.17 - -RUN set -eux; \ - \ - apk add --no-cache --virtual .build-deps \ - gnupg \ - tar \ - xz \ - \ - bluez-dev \ - bzip2-dev \ - dpkg-dev dpkg \ - expat-dev \ - findutils \ - gcc \ - gdbm-dev \ - libc-dev \ - libffi-dev \ - libnsl-dev \ - libtirpc-dev \ - linux-headers \ - make \ - ncurses-dev \ - openssl-dev \ - pax-utils \ - readline-dev \ - sqlite-dev \ - tcl-dev \ - tk \ - tk-dev \ - util-linux-dev \ - xz-dev \ - zlib-dev \ - ; \ - \ - wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ - wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; \ - GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \ - gpg --batch --verify python.tar.xz.asc python.tar.xz; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" python.tar.xz.asc; \ - mkdir -p /usr/src/python; \ - tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \ - rm python.tar.xz; \ - \ - cd /usr/src/python; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --enable-loadable-sqlite-extensions \ - --enable-optimizations \ - --enable-option-checking=fatal \ - --enable-shared \ - --with-system-expat \ - --without-ensurepip \ - ; \ - nproc="$(nproc)"; \ -# set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() -# https://github.com/alpinelinux/aports/commit/2026e1259422d4e0cf92391ca2d3844356c649d0 - EXTRA_CFLAGS="-DTHREAD_STACK_SIZE=0x100000"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ -# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - '; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - ; \ -# https://github.com/docker-library/python/issues/784 -# prevent accidental usage of a system installed libpython of the same version - rm python; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - python \ - ; \ - make install; \ - \ - cd /; \ - rm -rf /usr/src/python; \ - \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - -o \( -type f -a -name 'wininst-*.exe' \) \ - \) -exec rm -rf '{}' + \ - ; \ - \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec scanelf --needed --nobanner --format '%n#p' '{}' ';' \ - | tr ',' '\n' \ - | sort -u \ - | awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \ - | xargs -rt apk add --no-network --virtual .python-rundeps \ - ; \ - apk del --no-network .build-deps; \ - \ - python3 --version - -# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) -RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ - dst="$(echo "$src" | tr -d 3)"; \ - [ -s "/usr/local/bin/$src" ]; \ - [ ! -e "/usr/local/bin/$dst" ]; \ - ln -svT "$src" "/usr/local/bin/$dst"; \ - done - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 57.5.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/9af82b715db434abb94a0a6f3569f43e72157346/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 45a2bb8bf2bb5eff16fdd00faef6f29731831c7c59bd9fc2bf1f3bed511ff1fe - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] diff --git a/3.7/bookworm/Dockerfile b/3.7/bookworm/Dockerfile deleted file mode 100644 index 16a48bb81..000000000 --- a/3.7/bookworm/Dockerfile +++ /dev/null @@ -1,164 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bookworm - -# ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH - -# http://bugs.python.org/issue19846 -# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. -ENV LANG C.UTF-8 - -# runtime dependencies -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - libbluetooth-dev \ - tk-dev \ - uuid-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.7.17 - -RUN set -eux; \ - \ - wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ - wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; \ - GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \ - gpg --batch --verify python.tar.xz.asc python.tar.xz; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" python.tar.xz.asc; \ - mkdir -p /usr/src/python; \ - tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \ - rm python.tar.xz; \ - \ - cd /usr/src/python; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --enable-loadable-sqlite-extensions \ - --enable-optimizations \ - --enable-option-checking=fatal \ - --enable-shared \ - --with-system-expat \ - --without-ensurepip \ - ; \ - nproc="$(nproc)"; \ - EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ - LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ -# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - '; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - ; \ -# https://github.com/docker-library/python/issues/784 -# prevent accidental usage of a system installed libpython of the same version - rm python; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - python \ - ; \ - make install; \ - \ -# enable GDB to load debugging data: https://github.com/docker-library/python/pull/701 - bin="$(readlink -ve /usr/local/bin/python3)"; \ - dir="$(dirname "$bin")"; \ - mkdir -p "/usr/share/gdb/auto-load/$dir"; \ - cp -vL Tools/gdb/libpython.py "/usr/share/gdb/auto-load/$bin-gdb.py"; \ - \ - cd /; \ - rm -rf /usr/src/python; \ - \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - -o \( -type f -a -name 'wininst-*.exe' \) \ - \) -exec rm -rf '{}' + \ - ; \ - \ - ldconfig; \ - \ - python3 --version - -# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) -RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ - dst="$(echo "$src" | tr -d 3)"; \ - [ -s "/usr/local/bin/$src" ]; \ - [ ! -e "/usr/local/bin/$dst" ]; \ - ln -svT "$src" "/usr/local/bin/$dst"; \ - done - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 57.5.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/9af82b715db434abb94a0a6f3569f43e72157346/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 45a2bb8bf2bb5eff16fdd00faef6f29731831c7c59bd9fc2bf1f3bed511ff1fe - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] diff --git a/3.7/bullseye/Dockerfile b/3.7/bullseye/Dockerfile deleted file mode 100644 index 0b3a917ff..000000000 --- a/3.7/bullseye/Dockerfile +++ /dev/null @@ -1,164 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM buildpack-deps:bullseye - -# ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH - -# http://bugs.python.org/issue19846 -# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. -ENV LANG C.UTF-8 - -# runtime dependencies -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - libbluetooth-dev \ - tk-dev \ - uuid-dev \ - ; \ - rm -rf /var/lib/apt/lists/* - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.7.17 - -RUN set -eux; \ - \ - wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ - wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; \ - GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \ - gpg --batch --verify python.tar.xz.asc python.tar.xz; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" python.tar.xz.asc; \ - mkdir -p /usr/src/python; \ - tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \ - rm python.tar.xz; \ - \ - cd /usr/src/python; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --enable-loadable-sqlite-extensions \ - --enable-optimizations \ - --enable-option-checking=fatal \ - --enable-shared \ - --with-system-expat \ - --without-ensurepip \ - ; \ - nproc="$(nproc)"; \ - EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ - LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ -# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - '; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - ; \ -# https://github.com/docker-library/python/issues/784 -# prevent accidental usage of a system installed libpython of the same version - rm python; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - python \ - ; \ - make install; \ - \ -# enable GDB to load debugging data: https://github.com/docker-library/python/pull/701 - bin="$(readlink -ve /usr/local/bin/python3)"; \ - dir="$(dirname "$bin")"; \ - mkdir -p "/usr/share/gdb/auto-load/$dir"; \ - cp -vL Tools/gdb/libpython.py "/usr/share/gdb/auto-load/$bin-gdb.py"; \ - \ - cd /; \ - rm -rf /usr/src/python; \ - \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - -o \( -type f -a -name 'wininst-*.exe' \) \ - \) -exec rm -rf '{}' + \ - ; \ - \ - ldconfig; \ - \ - python3 --version - -# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) -RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ - dst="$(echo "$src" | tr -d 3)"; \ - [ -s "/usr/local/bin/$src" ]; \ - [ ! -e "/usr/local/bin/$dst" ]; \ - ln -svT "$src" "/usr/local/bin/$dst"; \ - done - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 57.5.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/9af82b715db434abb94a0a6f3569f43e72157346/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 45a2bb8bf2bb5eff16fdd00faef6f29731831c7c59bd9fc2bf1f3bed511ff1fe - -RUN set -eux; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] diff --git a/3.7/slim-bookworm/Dockerfile b/3.7/slim-bookworm/Dockerfile deleted file mode 100644 index 01388e061..000000000 --- a/3.7/slim-bookworm/Dockerfile +++ /dev/null @@ -1,207 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:bookworm-slim - -# ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH - -# http://bugs.python.org/issue19846 -# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. -ENV LANG C.UTF-8 - -# runtime dependencies -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - netbase \ - tzdata \ - ; \ - rm -rf /var/lib/apt/lists/* - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.7.17 - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - gcc \ - gnupg \ - libbluetooth-dev \ - libbz2-dev \ - libc6-dev \ - libdb-dev \ - libexpat1-dev \ - libffi-dev \ - libgdbm-dev \ - liblzma-dev \ - libncursesw5-dev \ - libreadline-dev \ - libsqlite3-dev \ - libssl-dev \ - make \ - tk-dev \ - uuid-dev \ - wget \ - xz-utils \ - zlib1g-dev \ - ; \ - \ - wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ - wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; \ - GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \ - gpg --batch --verify python.tar.xz.asc python.tar.xz; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" python.tar.xz.asc; \ - mkdir -p /usr/src/python; \ - tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \ - rm python.tar.xz; \ - \ - cd /usr/src/python; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --enable-loadable-sqlite-extensions \ - --enable-optimizations \ - --enable-option-checking=fatal \ - --enable-shared \ - --with-system-expat \ - --without-ensurepip \ - ; \ - nproc="$(nproc)"; \ - EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ - LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ -# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - '; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - ; \ -# https://github.com/docker-library/python/issues/784 -# prevent accidental usage of a system installed libpython of the same version - rm python; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - python \ - ; \ - make install; \ - \ - cd /; \ - rm -rf /usr/src/python; \ - \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - -o \( -type f -a -name 'wininst-*.exe' \) \ - \) -exec rm -rf '{}' + \ - ; \ - \ - ldconfig; \ - \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -r apt-mark manual \ - ; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - python3 --version - -# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) -RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ - dst="$(echo "$src" | tr -d 3)"; \ - [ -s "/usr/local/bin/$src" ]; \ - [ ! -e "/usr/local/bin/$dst" ]; \ - ln -svT "$src" "/usr/local/bin/$dst"; \ - done - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 57.5.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/9af82b715db434abb94a0a6f3569f43e72157346/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 45a2bb8bf2bb5eff16fdd00faef6f29731831c7c59bd9fc2bf1f3bed511ff1fe - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] diff --git a/3.7/slim-bullseye/Dockerfile b/3.7/slim-bullseye/Dockerfile deleted file mode 100644 index 6d137451c..000000000 --- a/3.7/slim-bullseye/Dockerfile +++ /dev/null @@ -1,207 +0,0 @@ -# -# NOTE: THIS DOCKERFILE IS GENERATED VIA "apply-templates.sh" -# -# PLEASE DO NOT EDIT IT DIRECTLY. -# - -FROM debian:bullseye-slim - -# ensure local python is preferred over distribution python -ENV PATH /usr/local/bin:$PATH - -# http://bugs.python.org/issue19846 -# > At the moment, setting "LANG=C" on a Linux system *fundamentally breaks Python 3*, and that's not OK. -ENV LANG C.UTF-8 - -# runtime dependencies -RUN set -eux; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - ca-certificates \ - netbase \ - tzdata \ - ; \ - rm -rf /var/lib/apt/lists/* - -ENV GPG_KEY 0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D -ENV PYTHON_VERSION 3.7.17 - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends \ - dpkg-dev \ - gcc \ - gnupg \ - libbluetooth-dev \ - libbz2-dev \ - libc6-dev \ - libdb-dev \ - libexpat1-dev \ - libffi-dev \ - libgdbm-dev \ - liblzma-dev \ - libncursesw5-dev \ - libreadline-dev \ - libsqlite3-dev \ - libssl-dev \ - make \ - tk-dev \ - uuid-dev \ - wget \ - xz-utils \ - zlib1g-dev \ - ; \ - \ - wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ - wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; \ - GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; \ - gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; \ - gpg --batch --verify python.tar.xz.asc python.tar.xz; \ - gpgconf --kill all; \ - rm -rf "$GNUPGHOME" python.tar.xz.asc; \ - mkdir -p /usr/src/python; \ - tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; \ - rm python.tar.xz; \ - \ - cd /usr/src/python; \ - gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \ - ./configure \ - --build="$gnuArch" \ - --enable-loadable-sqlite-extensions \ - --enable-optimizations \ - --enable-option-checking=fatal \ - --enable-shared \ - --with-system-expat \ - --without-ensurepip \ - ; \ - nproc="$(nproc)"; \ - EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ - LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; \ - LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ -# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - '; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:-}" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - ; \ -# https://github.com/docker-library/python/issues/784 -# prevent accidental usage of a system installed libpython of the same version - rm python; \ - make -j "$nproc" \ - "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ - "LDFLAGS=${LDFLAGS:--Wl},-rpath='\$\$ORIGIN/../lib'" \ - "PROFILE_TASK=${PROFILE_TASK:-}" \ - python \ - ; \ - make install; \ - \ - cd /; \ - rm -rf /usr/src/python; \ - \ - find /usr/local -depth \ - \( \ - \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ - -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ - -o \( -type f -a -name 'wininst-*.exe' \) \ - \) -exec rm -rf '{}' + \ - ; \ - \ - ldconfig; \ - \ - apt-mark auto '.*' > /dev/null; \ - apt-mark manual $savedAptMark; \ - find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' \ - | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' \ - | sort -u \ - | xargs -r dpkg-query --search \ - | cut -d: -f1 \ - | sort -u \ - | xargs -r apt-mark manual \ - ; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - python3 --version - -# make some useful symlinks that are expected to exist ("/usr/local/bin/python" and friends) -RUN set -eux; \ - for src in idle3 pydoc3 python3 python3-config; do \ - dst="$(echo "$src" | tr -d 3)"; \ - [ -s "/usr/local/bin/$src" ]; \ - [ ! -e "/usr/local/bin/$dst" ]; \ - ln -svT "$src" "/usr/local/bin/$dst"; \ - done - -# if this is called "PIP_VERSION", pip explodes with "ValueError: invalid truth value ''" -ENV PYTHON_PIP_VERSION 23.0.1 -# https://github.com/docker-library/python/issues/365 -ENV PYTHON_SETUPTOOLS_VERSION 57.5.0 -# https://github.com/pypa/get-pip -ENV PYTHON_GET_PIP_URL https://github.com/pypa/get-pip/raw/9af82b715db434abb94a0a6f3569f43e72157346/public/get-pip.py -ENV PYTHON_GET_PIP_SHA256 45a2bb8bf2bb5eff16fdd00faef6f29731831c7c59bd9fc2bf1f3bed511ff1fe - -RUN set -eux; \ - \ - savedAptMark="$(apt-mark showmanual)"; \ - apt-get update; \ - apt-get install -y --no-install-recommends wget; \ - \ - wget -O get-pip.py "$PYTHON_GET_PIP_URL"; \ - echo "$PYTHON_GET_PIP_SHA256 *get-pip.py" | sha256sum -c -; \ - \ - apt-mark auto '.*' > /dev/null; \ - [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark > /dev/null; \ - apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ - \ - export PYTHONDONTWRITEBYTECODE=1; \ - \ - python get-pip.py \ - --disable-pip-version-check \ - --no-cache-dir \ - --no-compile \ - "pip==$PYTHON_PIP_VERSION" \ - "setuptools==$PYTHON_SETUPTOOLS_VERSION" \ - ; \ - rm -f get-pip.py; \ - \ - pip --version - -CMD ["python3"] diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index e17bf01b1..8ab05e6d0 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -49,10 +49,6 @@ RUN set -eux; \ ENV GPG_KEY {{ { - # gpg: key AA65421D: public key "Ned Deily (Python release signing key) " imported - "3.7": "0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D", - # https://www.python.org/dev/peps/pep-0537/#release-manager-and-crew - # gpg: key B26995E310250568: public key "\xc5\x81ukasz Langa (GPG langa.pl) " imported "3.8": "E3FF2839C048B25C084DEBE9B26995E310250568", # https://www.python.org/dev/peps/pep-0569/#release-manager-and-crew @@ -159,7 +155,7 @@ RUN set -eux; \ --enable-shared \ {{ # <3.10 does not have -fno-semantic-interposition enabled and --with-lto does nothing for performance - if [ "3.7", "3.8", "3.9" ] | index(rcVersion) then "" else ( + if [ "3.8", "3.9" ] | index(rcVersion) then "" else ( -}} --with-lto \ {{ ) end -}} @@ -178,52 +174,6 @@ RUN set -eux; \ {{ if is_slim or is_alpine then ( -}} LDFLAGS="${LDFLAGS:--Wl},--strip-all"; \ {{ ) else "" end -}} -{{ if env.version == "3.7" then ( -}} -# setting PROFILE_TASK makes "--enable-optimizations" reasonable: https://bugs.python.org/issue36044 / https://github.com/docker-library/python/issues/160#issuecomment-509426916 - PROFILE_TASK='-m test.regrtest --pgo \ - test_array \ - test_base64 \ - test_binascii \ - test_binhex \ - test_binop \ - test_bytes \ - test_c_locale_coercion \ - test_class \ - test_cmath \ - test_codecs \ - test_compile \ - test_complex \ - test_csv \ - test_decimal \ - test_dict \ - test_float \ - test_fstring \ - test_hashlib \ - test_io \ - test_iter \ - test_json \ - test_long \ - test_math \ - test_memoryview \ - test_pickle \ - test_re \ - test_set \ - test_slice \ - test_struct \ - test_threading \ - test_time \ - test_traceback \ - test_unicode \ - '; \ -{{ -) else - # PROFILE_TASK has a reasonable default starting in 3.8+; see: - # https://bugs.python.org/issue36044 - # https://github.com/python/cpython/pull/14702 - # https://github.com/python/cpython/pull/14910 - "" -end --}} make -j "$nproc" \ "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" \ "LDFLAGS=${LDFLAGS:-}" \ @@ -255,7 +205,7 @@ end \( \ \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) \ -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \ -{{ if [ "3.7", "3.8" ] | index(env.version) then ( -}} +{{ if [ "3.8" ] | index(env.version) then ( -}} -o \( -type f -a -name 'wininst-*.exe' \) \ {{ ) else diff --git a/generate-stackbrew-library.sh b/generate-stackbrew-library.sh index 8bc5f2f99..353d9e282 100755 --- a/generate-stackbrew-library.sh +++ b/generate-stackbrew-library.sh @@ -135,7 +135,7 @@ for version; do esac case "$version" in - 3.7 | 3.8 | 3.9) ;; + 3.8 | 3.9) ;; *) # https://github.com/python/cpython/issues/93619 + https://peps.python.org/pep-0011/ variantArches="$(sed <<<" $variantArches " -e 's/ mips64le / /g')" diff --git a/versions.json b/versions.json index 931fdfadf..daee678c5 100644 --- a/versions.json +++ b/versions.json @@ -66,28 +66,6 @@ ], "version": "3.12.0" }, - "3.7": { - "get-pip": { - "sha256": "45a2bb8bf2bb5eff16fdd00faef6f29731831c7c59bd9fc2bf1f3bed511ff1fe", - "url": "https://github.com/pypa/get-pip/raw/9af82b715db434abb94a0a6f3569f43e72157346/public/get-pip.py", - "version": "https://github.com/pypa/get-pip/commit/9af82b715db434abb94a0a6f3569f43e72157346" - }, - "pip": { - "version": "23.0.1" - }, - "setuptools": { - "version": "57.5.0" - }, - "variants": [ - "bookworm", - "slim-bookworm", - "bullseye", - "slim-bullseye", - "alpine3.18", - "alpine3.17" - ], - "version": "3.7.17" - }, "3.8": { "get-pip": { "sha256": "45a2bb8bf2bb5eff16fdd00faef6f29731831c7c59bd9fc2bf1f3bed511ff1fe", diff --git a/versions.sh b/versions.sh index 71896208e..fa8b73f8e 100755 --- a/versions.sh +++ b/versions.sh @@ -136,7 +136,7 @@ for version in "${versions[@]}"; do setuptoolsVersion="$(sed -nre 's/^_SETUPTOOLS_VERSION[[:space:]]*=[[:space:]]*"(.*?)".*/\1/p' <<<"$ensurepipVersions")" case "$rcVersion" in - 3.7 | 3.8 | 3.9 | 3.10 | 3.11) + 3.8 | 3.9 | 3.10 | 3.11) if [ -z "$setuptoolsVersion" ]; then echo >&2 "error: $version: missing setuptools version" exit 1 @@ -146,7 +146,7 @@ for version in "${versions[@]}"; do exit 1 fi - # TODO remove this once Python 3.7 and 3.8 are either "new enough setuptools" or EOL + # TODO remove this once Python 3.8 is either "new enough setuptools" or EOL setuptoolsVersion="$( { echo "$setuptoolsVersion"