aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Chris Lovering <[email protected]>2024-10-07 18:45:55 +0100
committerGravatar Chris Lovering <[email protected]>2024-10-07 19:51:22 +0100
commitaecc6f4bed6ba9908bdc698c23c347ff55c78299 (patch)
tree574998ebe5217d58e964445526f84a700633007c
parentAdd test to ensure free threaded versions have GIL disabled (diff)
Also install 3.13t
This is a free threaded version of python https://docs.python.org/3.13/whatsnew/3.13.html#free-threaded-cpython
-rw-r--r--Dockerfile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
index 6c8bffa..f68b789 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -40,6 +40,14 @@ RUN /build_python.sh 3.12.7
FROM builder-py-base as builder-py-3_13
RUN /build_python.sh 3.13.0rc3
# ------------------------------------------------------------------------------
+FROM builder-py-base as builder-py-3_13t
+# Building with all 3 of the options below causes tests to fail.
+# Removing just the first means the image is a bit bigger, but we keep optimisations
+# --disable-test-modules --enable-optimizations --with-lto
+ENV PYTHON_CONFIGURE_OPTS='--enable-optimizations --with-lto --with-system-expat --without-ensurepip'
+RUN /build_python.sh 3.13.0rc3t
+RUN mv /snekbin/python/3.13 /snekbin/python/3.13t
+# ------------------------------------------------------------------------------
FROM python:3.12-slim-bookworm as base
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 \
@@ -56,6 +64,7 @@ RUN apt-get -y update \
COPY --link --from=builder-nsjail /nsjail/nsjail /usr/sbin/
COPY --link --from=builder-py-3_12 /snekbin/ /snekbin/
COPY --link --from=builder-py-3_13 /snekbin/ /snekbin/
+COPY --link --from=builder-py-3_13t /snekbin/ /snekbin/
RUN chmod +x /usr/sbin/nsjail \
&& ln -s /snekbin/python/3.12/ /snekbin/python/default