Skip to content

Commit 670b106

Browse files
committed
DNM: enable the experimental JIT in 3.13+
1 parent 2074a85 commit 670b106

File tree

9 files changed

+103
-0
lines changed

9 files changed

+103
-0
lines changed

3.13/bookworm/Dockerfile

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.13/slim-bookworm/Dockerfile

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.13/slim-trixie/Dockerfile

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.13/trixie/Dockerfile

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.14/bookworm/Dockerfile

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.14/slim-bookworm/Dockerfile

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.14/slim-trixie/Dockerfile

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

3.14/trixie/Dockerfile

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Dockerfile-linux.template

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
def rcVersion:
99
env.version | rtrimstr("-rc")
1010
;
11+
def llvmVersion:
12+
{
13+
"3.13": "18", # https://github.com/python/cpython/blob/3.13/Tools/jit/README.md
14+
"3.14": "19", # https://github.com/python/cpython/blob/3.14/Tools/jit/README.md
15+
}[rcVersion]
16+
;
1117
def clean_apt:
1218
# TODO once bookworm is EOL, remove this and just hard-code "apt-get dist-clean" instead
1319
if env.variant | contains("bookworm") then
@@ -155,6 +161,12 @@ RUN set -eux; \
155161
if IN(env.version; "3.9", "3.10", "3.11", "3.12", "3.13") then empty else
156162
"libzstd-dev"
157163
end,
164+
if llvmVersion then
165+
"clang-\(llvmVersion)",
166+
"llvm-\(llvmVersion)",
167+
"python3", # "Python 3.11 or newer is required to build the JIT."
168+
empty
169+
else empty end,
158170
empty
159171
end
160172
] -}}
@@ -215,6 +227,11 @@ RUN set -eux; \
215227
$(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') \
216228
{{ ) end -}}
217229
--with-ensurepip \
230+
{{ if IN(rcVersion; "3.9", "3.10", "3.11", "3.12") or is_alpine then "" else ( -}}
231+
# https://github.com/docker-library/python/issues/947
232+
# https://docs.python.org/3.14/whatsnew/3.14.html#binary-releases-for-the-experimental-just-in-time-compiler
233+
--enable-experimental-jit=yes-off \
234+
{{ ) end -}}
218235
; \
219236
nproc="$(nproc)"; \
220237
{{ if is_alpine then ( -}}

0 commit comments

Comments
 (0)