From 9af533eca6644929ee1d4fe305e8b0d001617dbf Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Mon, 19 May 2025 16:25:47 -0700 Subject: [PATCH 1/2] Add Debian Trixie (and remove Bullseye) --- 3.10/alpine3.21/Dockerfile | 2 +- 3.10/alpine3.22/Dockerfile | 2 +- 3.10/bookworm/Dockerfile | 2 +- 3.10/slim-bookworm/Dockerfile | 7 +++--- .../{slim-bullseye => slim-trixie}/Dockerfile | 13 +++++----- 3.10/{bullseye => trixie}/Dockerfile | 6 ++--- 3.11/alpine3.21/Dockerfile | 2 +- 3.11/alpine3.22/Dockerfile | 2 +- 3.11/bookworm/Dockerfile | 2 +- 3.11/slim-bookworm/Dockerfile | 7 +++--- .../{slim-bullseye => slim-trixie}/Dockerfile | 13 +++++----- 3.11/{bullseye => trixie}/Dockerfile | 6 ++--- 3.12/alpine3.21/Dockerfile | 2 +- 3.12/alpine3.22/Dockerfile | 2 +- 3.12/bookworm/Dockerfile | 2 +- 3.12/slim-bookworm/Dockerfile | 7 +++--- .../{slim-bullseye => slim-trixie}/Dockerfile | 13 +++++----- 3.12/{bullseye => trixie}/Dockerfile | 6 ++--- 3.13/alpine3.21/Dockerfile | 2 +- 3.13/alpine3.22/Dockerfile | 2 +- 3.13/bookworm/Dockerfile | 2 +- 3.13/slim-bookworm/Dockerfile | 7 +++--- .../{slim-bullseye => slim-trixie}/Dockerfile | 13 +++++----- 3.13/{bullseye => trixie}/Dockerfile | 6 ++--- 3.14-rc/alpine3.21/Dockerfile | 2 +- 3.14-rc/alpine3.22/Dockerfile | 2 +- 3.14-rc/bookworm/Dockerfile | 2 +- 3.14-rc/slim-bookworm/Dockerfile | 7 +++--- .../{slim-bullseye => slim-trixie}/Dockerfile | 13 +++++----- 3.14-rc/{bullseye => trixie}/Dockerfile | 6 ++--- 3.9/slim-bookworm/Dockerfile | 5 ++-- 3.9/{slim-bullseye => slim-trixie}/Dockerfile | 11 +++++---- 3.9/{bullseye => trixie}/Dockerfile | 4 ++-- Dockerfile-linux.template | 19 ++++++++++----- versions.json | 24 +++++++++---------- versions.sh | 2 +- 36 files changed, 122 insertions(+), 103 deletions(-) rename 3.10/{slim-bullseye => slim-trixie}/Dockerfile (91%) rename 3.10/{bullseye => trixie}/Dockerfile (96%) rename 3.11/{slim-bullseye => slim-trixie}/Dockerfile (91%) rename 3.11/{bullseye => trixie}/Dockerfile (96%) rename 3.12/{slim-bullseye => slim-trixie}/Dockerfile (92%) rename 3.12/{bullseye => trixie}/Dockerfile (96%) rename 3.13/{slim-bullseye => slim-trixie}/Dockerfile (91%) rename 3.13/{bullseye => trixie}/Dockerfile (96%) rename 3.14-rc/{slim-bullseye => slim-trixie}/Dockerfile (91%) rename 3.14-rc/{bullseye => trixie}/Dockerfile (96%) rename 3.9/{slim-bullseye => slim-trixie}/Dockerfile (92%) rename 3.9/{bullseye => trixie}/Dockerfile (98%) diff --git a/3.10/alpine3.21/Dockerfile b/3.10/alpine3.21/Dockerfile index 6cc036e23..a3ec54a2c 100644 --- a/3.10/alpine3.21/Dockerfile +++ b/3.10/alpine3.21/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.10/alpine3.22/Dockerfile b/3.10/alpine3.22/Dockerfile index b91541a49..5825dfc91 100644 --- a/3.10/alpine3.22/Dockerfile +++ b/3.10/alpine3.22/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.10/bookworm/Dockerfile b/3.10/bookworm/Dockerfile index 26a7c1623..ec5fb35b7 100644 --- a/3.10/bookworm/Dockerfile +++ b/3.10/bookworm/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.10/slim-bookworm/Dockerfile b/3.10/slim-bookworm/Dockerfile index 49411c8e6..a947bef2c 100644 --- a/3.10/slim-bookworm/Dockerfile +++ b/3.10/slim-bookworm/Dockerfile @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -113,8 +113,9 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ diff --git a/3.10/slim-bullseye/Dockerfile b/3.10/slim-trixie/Dockerfile similarity index 91% rename from 3.10/slim-bullseye/Dockerfile rename to 3.10/slim-trixie/Dockerfile index 6d6aa7fe9..1077d95c6 100644 --- a/3.10/slim-bullseye/Dockerfile +++ b/3.10/slim-trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:bullseye-slim +FROM debian:trixie-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ netbase \ tzdata \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D ENV PYTHON_VERSION 3.10.18 @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -113,13 +113,14 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + apt-get dist-clean; \ \ export PYTHONDONTWRITEBYTECODE=1; \ python3 --version; \ diff --git a/3.10/bullseye/Dockerfile b/3.10/trixie/Dockerfile similarity index 96% rename from 3.10/bullseye/Dockerfile rename to 3.10/trixie/Dockerfile index 965b0995c..416147445 100644 --- a/3.10/bullseye/Dockerfile +++ b/3.10/trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:bullseye +FROM buildpack-deps:trixie # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ tk-dev \ uuid-dev \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D ENV PYTHON_VERSION 3.10.18 @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.11/alpine3.21/Dockerfile b/3.11/alpine3.21/Dockerfile index a164244d7..078086c67 100644 --- a/3.11/alpine3.21/Dockerfile +++ b/3.11/alpine3.21/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.11/alpine3.22/Dockerfile b/3.11/alpine3.22/Dockerfile index 954cf29ea..c1680e4d4 100644 --- a/3.11/alpine3.22/Dockerfile +++ b/3.11/alpine3.22/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.11/bookworm/Dockerfile b/3.11/bookworm/Dockerfile index 68c68dee3..6f09b8e9d 100644 --- a/3.11/bookworm/Dockerfile +++ b/3.11/bookworm/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.11/slim-bookworm/Dockerfile b/3.11/slim-bookworm/Dockerfile index a2538726e..1bdaf3136 100644 --- a/3.11/slim-bookworm/Dockerfile +++ b/3.11/slim-bookworm/Dockerfile @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -113,8 +113,9 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ diff --git a/3.11/slim-bullseye/Dockerfile b/3.11/slim-trixie/Dockerfile similarity index 91% rename from 3.11/slim-bullseye/Dockerfile rename to 3.11/slim-trixie/Dockerfile index 5f64e97b3..7c6f288a8 100644 --- a/3.11/slim-bullseye/Dockerfile +++ b/3.11/slim-trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:bullseye-slim +FROM debian:trixie-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ netbase \ tzdata \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D ENV PYTHON_VERSION 3.11.13 @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -113,13 +113,14 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + apt-get dist-clean; \ \ export PYTHONDONTWRITEBYTECODE=1; \ python3 --version; \ diff --git a/3.11/bullseye/Dockerfile b/3.11/trixie/Dockerfile similarity index 96% rename from 3.11/bullseye/Dockerfile rename to 3.11/trixie/Dockerfile index 1e1f136a3..a9a3d7637 100644 --- a/3.11/bullseye/Dockerfile +++ b/3.11/trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:bullseye +FROM buildpack-deps:trixie # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ tk-dev \ uuid-dev \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY A035C8C19219BA821ECEA86B64E628F8D684696D ENV PYTHON_VERSION 3.11.13 @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.12/alpine3.21/Dockerfile b/3.12/alpine3.21/Dockerfile index dc716a395..b4a1f5503 100644 --- a/3.12/alpine3.21/Dockerfile +++ b/3.12/alpine3.21/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.12/alpine3.22/Dockerfile b/3.12/alpine3.22/Dockerfile index e9346935b..bef8c1968 100644 --- a/3.12/alpine3.22/Dockerfile +++ b/3.12/alpine3.22/Dockerfile @@ -76,7 +76,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.12/bookworm/Dockerfile b/3.12/bookworm/Dockerfile index 6e1d059e7..78869e6d4 100644 --- a/3.12/bookworm/Dockerfile +++ b/3.12/bookworm/Dockerfile @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.12/slim-bookworm/Dockerfile b/3.12/slim-bookworm/Dockerfile index 17d0d4871..e8d80c657 100644 --- a/3.12/slim-bookworm/Dockerfile +++ b/3.12/slim-bookworm/Dockerfile @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -131,8 +131,9 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ diff --git a/3.12/slim-bullseye/Dockerfile b/3.12/slim-trixie/Dockerfile similarity index 92% rename from 3.12/slim-bullseye/Dockerfile rename to 3.12/slim-trixie/Dockerfile index 5dd6eb97e..e1aac06b9 100644 --- a/3.12/slim-bullseye/Dockerfile +++ b/3.12/slim-trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:bullseye-slim +FROM debian:trixie-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ netbase \ tzdata \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 ENV PYTHON_VERSION 3.12.11 @@ -75,7 +75,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -131,13 +131,14 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + apt-get dist-clean; \ \ export PYTHONDONTWRITEBYTECODE=1; \ python3 --version; \ diff --git a/3.12/bullseye/Dockerfile b/3.12/trixie/Dockerfile similarity index 96% rename from 3.12/bullseye/Dockerfile rename to 3.12/trixie/Dockerfile index b50a5ca4b..70b55a175 100644 --- a/3.12/bullseye/Dockerfile +++ b/3.12/trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:bullseye +FROM buildpack-deps:trixie # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ tk-dev \ uuid-dev \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 ENV PYTHON_VERSION 3.12.11 @@ -50,7 +50,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.13/alpine3.21/Dockerfile b/3.13/alpine3.21/Dockerfile index 51bb4f4dd..a400b5622 100644 --- a/3.13/alpine3.21/Dockerfile +++ b/3.13/alpine3.21/Dockerfile @@ -71,7 +71,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.13/alpine3.22/Dockerfile b/3.13/alpine3.22/Dockerfile index e09ba23c6..e021ed7c2 100644 --- a/3.13/alpine3.22/Dockerfile +++ b/3.13/alpine3.22/Dockerfile @@ -71,7 +71,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.13/bookworm/Dockerfile b/3.13/bookworm/Dockerfile index 0e7a877df..70536d175 100644 --- a/3.13/bookworm/Dockerfile +++ b/3.13/bookworm/Dockerfile @@ -45,7 +45,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.13/slim-bookworm/Dockerfile b/3.13/slim-bookworm/Dockerfile index 7b83eeb0d..83627f619 100644 --- a/3.13/slim-bookworm/Dockerfile +++ b/3.13/slim-bookworm/Dockerfile @@ -70,7 +70,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -126,8 +126,9 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ diff --git a/3.13/slim-bullseye/Dockerfile b/3.13/slim-trixie/Dockerfile similarity index 91% rename from 3.13/slim-bullseye/Dockerfile rename to 3.13/slim-trixie/Dockerfile index 6525ba94b..a1fb0d392 100644 --- a/3.13/slim-bullseye/Dockerfile +++ b/3.13/slim-trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:bullseye-slim +FROM debian:trixie-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -17,7 +17,7 @@ RUN set -eux; \ netbase \ tzdata \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 ENV PYTHON_VERSION 3.13.5 @@ -70,7 +70,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -126,13 +126,14 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + apt-get dist-clean; \ \ export PYTHONDONTWRITEBYTECODE=1; \ python3 --version; \ diff --git a/3.13/bullseye/Dockerfile b/3.13/trixie/Dockerfile similarity index 96% rename from 3.13/bullseye/Dockerfile rename to 3.13/trixie/Dockerfile index 727708bed..6642fb0ab 100644 --- a/3.13/bullseye/Dockerfile +++ b/3.13/trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:bullseye +FROM buildpack-deps:trixie # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -17,7 +17,7 @@ RUN set -eux; \ tk-dev \ uuid-dev \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY 7169605F62C751356D054A26A821E680E5FA6305 ENV PYTHON_VERSION 3.13.5 @@ -45,7 +45,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.14-rc/alpine3.21/Dockerfile b/3.14-rc/alpine3.21/Dockerfile index 12ae69e73..8f659ec6f 100644 --- a/3.14-rc/alpine3.21/Dockerfile +++ b/3.14-rc/alpine3.21/Dockerfile @@ -64,7 +64,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.14-rc/alpine3.22/Dockerfile b/3.14-rc/alpine3.22/Dockerfile index 87d223fc3..f4b23931c 100644 --- a/3.14-rc/alpine3.22/Dockerfile +++ b/3.14-rc/alpine3.22/Dockerfile @@ -64,7 +64,7 @@ RUN set -eux; \ --enable-loadable-sqlite-extensions \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.14-rc/bookworm/Dockerfile b/3.14-rc/bookworm/Dockerfile index effe40bb2..efcd1a3ce 100644 --- a/3.14-rc/bookworm/Dockerfile +++ b/3.14-rc/bookworm/Dockerfile @@ -38,7 +38,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.14-rc/slim-bookworm/Dockerfile b/3.14-rc/slim-bookworm/Dockerfile index 22d716de4..5d82533b4 100644 --- a/3.14-rc/slim-bookworm/Dockerfile +++ b/3.14-rc/slim-bookworm/Dockerfile @@ -63,7 +63,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -119,8 +119,9 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ diff --git a/3.14-rc/slim-bullseye/Dockerfile b/3.14-rc/slim-trixie/Dockerfile similarity index 91% rename from 3.14-rc/slim-bullseye/Dockerfile rename to 3.14-rc/slim-trixie/Dockerfile index d8cff31e8..f8b9ee340 100644 --- a/3.14-rc/slim-bullseye/Dockerfile +++ b/3.14-rc/slim-trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:bullseye-slim +FROM debian:trixie-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -17,7 +17,7 @@ RUN set -eux; \ netbase \ tzdata \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV PYTHON_VERSION 3.14.0b2 ENV PYTHON_SHA256 7ac9e84844bbc0a5a8f1f79a37a68b3b8caf2a58b4aa5999c49227cb36e70ea6 @@ -63,7 +63,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ @@ -119,13 +119,14 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + apt-get dist-clean; \ \ export PYTHONDONTWRITEBYTECODE=1; \ python3 --version; \ diff --git a/3.14-rc/bullseye/Dockerfile b/3.14-rc/trixie/Dockerfile similarity index 96% rename from 3.14-rc/bullseye/Dockerfile rename to 3.14-rc/trixie/Dockerfile index f6246d76f..d8cc5dd05 100644 --- a/3.14-rc/bullseye/Dockerfile +++ b/3.14-rc/trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:bullseye +FROM buildpack-deps:trixie # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -17,7 +17,7 @@ RUN set -eux; \ tk-dev \ uuid-dev \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV PYTHON_VERSION 3.14.0b2 ENV PYTHON_SHA256 7ac9e84844bbc0a5a8f1f79a37a68b3b8caf2a58b4aa5999c49227cb36e70ea6 @@ -38,7 +38,7 @@ RUN set -eux; \ --enable-optimizations \ --enable-option-checking=fatal \ --enable-shared \ - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ ; \ nproc="$(nproc)"; \ diff --git a/3.9/slim-bookworm/Dockerfile b/3.9/slim-bookworm/Dockerfile index c79cc6009..ffd7ab6fd 100644 --- a/3.9/slim-bookworm/Dockerfile +++ b/3.9/slim-bookworm/Dockerfile @@ -112,8 +112,9 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ diff --git a/3.9/slim-bullseye/Dockerfile b/3.9/slim-trixie/Dockerfile similarity index 92% rename from 3.9/slim-bullseye/Dockerfile rename to 3.9/slim-trixie/Dockerfile index 27ecb5b30..62aee2c10 100644 --- a/3.9/slim-bullseye/Dockerfile +++ b/3.9/slim-trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM debian:bullseye-slim +FROM debian:trixie-slim # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ netbase \ tzdata \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 ENV PYTHON_VERSION 3.9.23 @@ -112,13 +112,14 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + apt-get dist-clean; \ \ export PYTHONDONTWRITEBYTECODE=1; \ python3 --version; \ diff --git a/3.9/bullseye/Dockerfile b/3.9/trixie/Dockerfile similarity index 98% rename from 3.9/bullseye/Dockerfile rename to 3.9/trixie/Dockerfile index 93ee7089e..7aa7aa387 100644 --- a/3.9/bullseye/Dockerfile +++ b/3.9/trixie/Dockerfile @@ -4,7 +4,7 @@ # PLEASE DO NOT EDIT IT DIRECTLY. # -FROM buildpack-deps:bullseye +FROM buildpack-deps:trixie # ensure local python is preferred over distribution python ENV PATH /usr/local/bin:$PATH @@ -22,7 +22,7 @@ RUN set -eux; \ tk-dev \ uuid-dev \ ; \ - rm -rf /var/lib/apt/lists/* + apt-get dist-clean ENV GPG_KEY E3FF2839C048B25C084DEBE9B26995E310250568 ENV PYTHON_VERSION 3.9.23 diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index 8b3b8c824..b0ee03d7f 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -7,6 +7,12 @@ ; def rcVersion: env.version | rtrimstr("-rc") + ; + def clean_apt: + # TODO once bookworm is EOL, remove this and just hard-code "apt-get dist-clean" instead + if env.variant | contains("bookworm") then + "rm -rf /var/lib/apt/lists/*" + else "apt-get dist-clean" end -}} {{ if is_alpine then ( -}} FROM alpine:{{ env.variant | ltrimstr("alpine") }} @@ -48,7 +54,7 @@ RUN set -eux; \ uuid-dev \ {{ ) end -}} ; \ - rm -rf /var/lib/apt/lists/* + {{ clean_apt }} {{ ) end -}} {{ @@ -180,10 +186,10 @@ RUN set -eux; \ --enable-shared \ {{ # <3.10 does not have -fno-semantic-interposition enabled and --with-lto does nothing for performance - # skip LTO on alpine on riscv64: https://github.com/docker-library/python/pull/935, https://github.com/docker-library/python/pull/1038 + # skip LTO on riscv64: https://github.com/docker-library/python/pull/935, https://github.com/docker-library/python/pull/1038 if rcVersion == "3.9" then "" else ( -}} - $(test "$gnuArch" != 'riscv64-linux-musl' && echo '--with-lto') \ + $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ {{ ) end -}} --with-ensurepip \ ; \ @@ -283,13 +289,14 @@ RUN set -eux; \ 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 \ + | xargs -rt dpkg-query --search \ +# https://manpages.debian.org/bookworm/dpkg/dpkg-query.1.en.html#S (we ignore diversions and it'll be really unusual for more than one package to provide any given .so file) + | awk 'sub(":$", "", $1) { print $1 }' \ | sort -u \ | xargs -r apt-mark manual \ ; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \ - rm -rf /var/lib/apt/lists/*; \ + {{ clean_apt }}; \ {{ ) else "" end -}} {{ ) end -}} \ diff --git a/versions.json b/versions.json index 08090f787..310b4632e 100644 --- a/versions.json +++ b/versions.json @@ -9,10 +9,10 @@ "version": "65.5.1" }, "variants": [ + "trixie", + "slim-trixie", "bookworm", "slim-bookworm", - "bullseye", - "slim-bullseye", "alpine3.22", "alpine3.21" ], @@ -28,10 +28,10 @@ "version": "65.5.1" }, "variants": [ + "trixie", + "slim-trixie", "bookworm", "slim-bookworm", - "bullseye", - "slim-bullseye", "alpine3.22", "alpine3.21" ], @@ -44,10 +44,10 @@ } }, "variants": [ + "trixie", + "slim-trixie", "bookworm", "slim-bookworm", - "bullseye", - "slim-bullseye", "alpine3.22", "alpine3.21" ], @@ -63,10 +63,10 @@ } }, "variants": [ + "trixie", + "slim-trixie", "bookworm", "slim-bookworm", - "bullseye", - "slim-bullseye", "alpine3.22", "alpine3.21", "windows/windowsservercore-ltsc2025", @@ -84,10 +84,10 @@ } }, "variants": [ + "trixie", + "slim-trixie", "bookworm", "slim-bookworm", - "bullseye", - "slim-bullseye", "alpine3.22", "alpine3.21", "windows/windowsservercore-ltsc2025", @@ -105,10 +105,10 @@ "version": "58.1.0" }, "variants": [ + "trixie", + "slim-trixie", "bookworm", "slim-bookworm", - "bullseye", - "slim-bullseye", "alpine3.22", "alpine3.21" ], diff --git a/versions.sh b/versions.sh index d4ac179b8..6b2ad252a 100755 --- a/versions.sh +++ b/versions.sh @@ -195,8 +195,8 @@ for version in "${versions[@]}"; do version: env.fullVersion, variants: [ ( + "trixie", "bookworm", - "bullseye", empty | ., "slim-" + .), # https://github.com/docker-library/ruby/pull/142#issuecomment-320012893 ( From 5c68f4f660b010bc1e16259fc8590f4218e0c9d8 Mon Sep 17 00:00:00 2001 From: Tianon Gravi Date: Thu, 22 May 2025 13:46:11 -0700 Subject: [PATCH 2/2] DNM: disable the GIL (experimental) AND enable the experimental JIT in 3.13+ --- 3.13/alpine3.21/Dockerfile | 7 +++++++ 3.13/alpine3.22/Dockerfile | 7 +++++++ 3.13/bookworm/Dockerfile | 3 +++ 3.13/slim-bookworm/Dockerfile | 7 +++++++ 3.13/slim-trixie/Dockerfile | 7 +++++++ 3.13/trixie/Dockerfile | 3 +++ 3.14-rc/alpine3.21/Dockerfile | 7 +++++++ 3.14-rc/alpine3.22/Dockerfile | 7 +++++++ 3.14-rc/bookworm/Dockerfile | 3 +++ 3.14-rc/slim-bookworm/Dockerfile | 7 +++++++ 3.14-rc/slim-trixie/Dockerfile | 7 +++++++ 3.14-rc/trixie/Dockerfile | 3 +++ Dockerfile-linux.template | 20 ++++++++++++++++++++ 13 files changed, 88 insertions(+) diff --git a/3.13/alpine3.21/Dockerfile b/3.13/alpine3.21/Dockerfile index a400b5622..d81c0b200 100644 --- a/3.13/alpine3.21/Dockerfile +++ b/3.13/alpine3.21/Dockerfile @@ -50,6 +50,10 @@ RUN set -eux; \ util-linux-dev \ xz-dev \ zlib-dev \ +# hack hack hack: https://github.com/python/cpython/blob/3.13/Tools/jit/README.md + clang18 \ + llvm18 \ + python3 \ ; \ \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ @@ -73,6 +77,9 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() diff --git a/3.13/alpine3.22/Dockerfile b/3.13/alpine3.22/Dockerfile index e021ed7c2..0fcf029f6 100644 --- a/3.13/alpine3.22/Dockerfile +++ b/3.13/alpine3.22/Dockerfile @@ -50,6 +50,10 @@ RUN set -eux; \ util-linux-dev \ xz-dev \ zlib-dev \ +# hack hack hack: https://github.com/python/cpython/blob/3.13/Tools/jit/README.md + clang18 \ + llvm18 \ + python3 \ ; \ \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ @@ -73,6 +77,9 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() diff --git a/3.13/bookworm/Dockerfile b/3.13/bookworm/Dockerfile index 70536d175..5da08fe85 100644 --- a/3.13/bookworm/Dockerfile +++ b/3.13/bookworm/Dockerfile @@ -47,6 +47,9 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.13/slim-bookworm/Dockerfile b/3.13/slim-bookworm/Dockerfile index 83627f619..39737da24 100644 --- a/3.13/slim-bookworm/Dockerfile +++ b/3.13/slim-bookworm/Dockerfile @@ -48,6 +48,10 @@ RUN set -eux; \ wget \ xz-utils \ zlib1g-dev \ +# hack hack hack: https://github.com/python/cpython/blob/3.13/Tools/jit/README.md + clang-18 \ + llvm-18 \ + python3 \ ; \ \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ @@ -72,6 +76,9 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.13/slim-trixie/Dockerfile b/3.13/slim-trixie/Dockerfile index a1fb0d392..dd1ed28f2 100644 --- a/3.13/slim-trixie/Dockerfile +++ b/3.13/slim-trixie/Dockerfile @@ -48,6 +48,10 @@ RUN set -eux; \ wget \ xz-utils \ zlib1g-dev \ +# hack hack hack: https://github.com/python/cpython/blob/3.13/Tools/jit/README.md + clang-18 \ + llvm-18 \ + python3 \ ; \ \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ @@ -72,6 +76,9 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.13/trixie/Dockerfile b/3.13/trixie/Dockerfile index 6642fb0ab..fe25aa117 100644 --- a/3.13/trixie/Dockerfile +++ b/3.13/trixie/Dockerfile @@ -47,6 +47,9 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.14-rc/alpine3.21/Dockerfile b/3.14-rc/alpine3.21/Dockerfile index 8f659ec6f..1d909bb0e 100644 --- a/3.14-rc/alpine3.21/Dockerfile +++ b/3.14-rc/alpine3.21/Dockerfile @@ -49,6 +49,10 @@ RUN set -eux; \ util-linux-dev \ xz-dev \ zlib-dev \ +# hack hack hack: https://github.com/python/cpython/blob/3.13/Tools/jit/README.md + clang19 \ + llvm19 \ + python3 \ ; \ \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ @@ -66,6 +70,9 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() diff --git a/3.14-rc/alpine3.22/Dockerfile b/3.14-rc/alpine3.22/Dockerfile index f4b23931c..331563938 100644 --- a/3.14-rc/alpine3.22/Dockerfile +++ b/3.14-rc/alpine3.22/Dockerfile @@ -49,6 +49,10 @@ RUN set -eux; \ util-linux-dev \ xz-dev \ zlib-dev \ +# hack hack hack: https://github.com/python/cpython/blob/3.13/Tools/jit/README.md + clang19 \ + llvm19 \ + python3 \ ; \ \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ @@ -66,6 +70,9 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ ; \ nproc="$(nproc)"; \ # set thread stack size to 1MB so we don't segfault before we hit sys.getrecursionlimit() diff --git a/3.14-rc/bookworm/Dockerfile b/3.14-rc/bookworm/Dockerfile index efcd1a3ce..efa5d3675 100644 --- a/3.14-rc/bookworm/Dockerfile +++ b/3.14-rc/bookworm/Dockerfile @@ -40,6 +40,9 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.14-rc/slim-bookworm/Dockerfile b/3.14-rc/slim-bookworm/Dockerfile index 5d82533b4..c0a0193fb 100644 --- a/3.14-rc/slim-bookworm/Dockerfile +++ b/3.14-rc/slim-bookworm/Dockerfile @@ -47,6 +47,10 @@ RUN set -eux; \ wget \ xz-utils \ zlib1g-dev \ +# hack hack hack: https://github.com/python/cpython/blob/3.13/Tools/jit/README.md + clang-19 \ + llvm-19 \ + python3 \ ; \ \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ @@ -65,6 +69,9 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.14-rc/slim-trixie/Dockerfile b/3.14-rc/slim-trixie/Dockerfile index f8b9ee340..c43fd5960 100644 --- a/3.14-rc/slim-trixie/Dockerfile +++ b/3.14-rc/slim-trixie/Dockerfile @@ -47,6 +47,10 @@ RUN set -eux; \ wget \ xz-utils \ zlib1g-dev \ +# hack hack hack: https://github.com/python/cpython/blob/3.13/Tools/jit/README.md + clang-19 \ + llvm-19 \ + python3 \ ; \ \ wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; \ @@ -65,6 +69,9 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/3.14-rc/trixie/Dockerfile b/3.14-rc/trixie/Dockerfile index d8cc5dd05..cdac325e5 100644 --- a/3.14-rc/trixie/Dockerfile +++ b/3.14-rc/trixie/Dockerfile @@ -40,6 +40,9 @@ RUN set -eux; \ --enable-shared \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ --with-ensurepip \ +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ ; \ nproc="$(nproc)"; \ EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; \ diff --git a/Dockerfile-linux.template b/Dockerfile-linux.template index b0ee03d7f..35270f4a3 100644 --- a/Dockerfile-linux.template +++ b/Dockerfile-linux.template @@ -96,6 +96,8 @@ ENV PYTHON_SHA256 {{ .checksums.source.sha256 }} RUN set -eux; \ \ +{{ # https://github.com/python/cpython/blob/3.13/Tools/jit/README.md -}} +{{ def llvmVersion: if rcVersion == "3.13" then "18" else "19" end -}} {{ if is_alpine then ( -}} apk add --no-cache --virtual .build-deps \ gnupg \ @@ -125,6 +127,12 @@ RUN set -eux; \ util-linux-dev \ xz-dev \ zlib-dev \ +{{ if IN(rcVersion; "3.9", "3.10", "3.11", "3.12") then "" else ( -}} +# hack hack hack: https://github.com/python/cpython/blob/3.13/Tools/jit/README.md + clang{{ llvmVersion }} \ + llvm{{ llvmVersion }} \ + python3 \ +{{ ) end -}} ; \ \ {{ ) elif is_slim then ( -}} @@ -151,6 +159,13 @@ RUN set -eux; \ wget \ xz-utils \ zlib1g-dev \ +{{ if IN(rcVersion; "3.9", "3.10", "3.11", "3.12") then "" else ( -}} +# hack hack hack: https://github.com/python/cpython/blob/3.13/Tools/jit/README.md +{{ def llvmVersion: if rcVersion == "3.13" then "18" else "19" end -}} + clang-{{ llvmVersion }} \ + llvm-{{ llvmVersion }} \ + python3 \ +{{ ) end -}} ; \ \ {{ ) else "" end -}} @@ -192,6 +207,11 @@ RUN set -eux; \ $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \ {{ ) end -}} --with-ensurepip \ +{{ if IN(rcVersion; "3.9", "3.10", "3.11", "3.12") then "" else ( -}} +# https://github.com/docker-library/python/issues/947 + --disable-gil \ + --enable-experimental-jit=yes \ +{{ ) end -}} ; \ nproc="$(nproc)"; \ {{ if is_alpine then ( -}} pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy