Skip to content

Commit 87f462b

Browse files
authored
Drop CPython 3.6 & 3.7 (#1673)
* Drop CPython 3.6 * Drop CPython 3.7 & PyPy 3.7
1 parent ed0a58e commit 87f462b

10 files changed

+22
-7881
lines changed

README.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,12 @@ Image content
268268

269269
All supported images currently contain:
270270

271-
- CPython 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t and PyPy 3.7, 3.8, 3.9, 3.10 installed in
271+
- CPython 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.13t and PyPy 3.8, 3.9, 3.10 installed in
272272
``/opt/python/<python tag>-<abi tag>``. The directories are named
273273
after the PEP 425 tags for each environment --
274-
e.g. ``/opt/python/cp37-cp37m`` contains a CPython 3.7 build, and
274+
e.g. ``/opt/python/cp313-cp313`` contains a CPython 3.13 build, and
275275
can be used to produce wheels named like
276-
``<pkg>-<version>-cp37-cp37m-<arch>.whl``.
276+
``<pkg>-<version>-cp313-cp313-<arch>.whl``.
277277

278278
- Development packages for all the libraries that PEP 571/599 list. One should not assume the presence of any other development package.
279279

docker/Dockerfile

+4-16
Original file line numberDiff line numberDiff line change
@@ -109,28 +109,18 @@ RUN export MPDECIMAL_ROOT=mpdecimal-4.0.0 && \
109109

110110
FROM --platform=${BUILDPLATFORM} ghcr.io/sigstore/cosign/cosign:v2.4.2 AS cosign-bin
111111

112-
FROM build_base AS build_cpython_system_ssl
112+
FROM build_base AS build_cpython
113113
COPY --from=build_tcl_tk /manylinux-buildfs /
114114
COPY --from=build_mpdecimal /manylinux-buildfs /
115115
COPY --from=build_sqlite3 /manylinux-buildfs /
116-
COPY build_scripts/build-cpython.sh /build_scripts/
117116
RUN if command -v apk >/dev/null 2>&1; then ldconfig /; else ldconfig; fi
118-
COPY --from=cosign-bin /ko-app/cosign /usr/local/bin/cosign
119-
120-
FROM build_cpython_system_ssl AS build_cpython
121117
COPY build_scripts/build-openssl.sh /build_scripts/
122118
RUN export OPENSSL_ROOT=openssl-3.0.16 && \
123119
export OPENSSL_HASH=57e03c50feab5d31b152af2b764f10379aecd8ee92f16c985983ce4a99f7ef86 && \
124120
export OPENSSL_DOWNLOAD_URL=https://github.com/openssl/openssl/releases/download/${OPENSSL_ROOT} && \
125121
manylinux-entrypoint /build_scripts/build-openssl.sh
126-
127-
128-
FROM build_cpython_system_ssl AS build_cpython36
129-
COPY build_scripts/cpython-pubkeys.txt /build_scripts/cpython-pubkeys.txt
130-
RUN manylinux-entrypoint /build_scripts/build-cpython.sh "" "" 3.6.15
131-
132-
FROM build_cpython_system_ssl AS build_cpython37
133-
RUN manylinux-entrypoint /build_scripts/build-cpython.sh [email protected] https://github.com/login/oauth 3.7.17
122+
COPY --from=cosign-bin /ko-app/cosign /usr/local/bin/cosign
123+
COPY build_scripts/build-cpython.sh /build_scripts/
134124

135125
FROM build_cpython AS build_cpython38
136126
RUN manylinux-entrypoint /build_scripts/build-cpython.sh [email protected] https://github.com/login/oauth 3.8.20
@@ -160,9 +150,7 @@ COPY --from=build_mpdecimal /manylinux-rootfs /
160150
COPY --from=build_sqlite3 /manylinux-rootfs /
161151
COPY --from=build_git /manylinux-rootfs /
162152
COPY build_scripts /opt/_internal/build_scripts/
163-
RUN --mount=type=bind,target=/build_cpython36,from=build_cpython36 \
164-
--mount=type=bind,target=/build_cpython37,from=build_cpython37 \
165-
--mount=type=bind,target=/build_cpython38,from=build_cpython38 \
153+
RUN --mount=type=bind,target=/build_cpython38,from=build_cpython38 \
166154
--mount=type=bind,target=/build_cpython39,from=build_cpython39 \
167155
--mount=type=bind,target=/build_cpython310,from=build_cpython310 \
168156
--mount=type=bind,target=/build_cpython311,from=build_cpython311 \

docker/build_scripts/build-cpython.sh

+4-15
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,8 @@ function pyver_dist_dir {
2828

2929
CPYTHON_DIST_DIR=$(pyver_dist_dir "${CPYTHON_VERSION}")
3030
fetch_source "Python-${CPYTHON_VERSION}.tar.xz" "${CPYTHON_DOWNLOAD_URL}/${CPYTHON_DIST_DIR}"
31-
if [ "${CERT_IDENTITY}" == "" ]; then
32-
fetch_source "Python-${CPYTHON_VERSION}.tar.xz.asc" "${CPYTHON_DOWNLOAD_URL}/${CPYTHON_DIST_DIR}"
33-
gpg --import "${MY_DIR}/cpython-pubkeys.txt"
34-
gpg --verify "Python-${CPYTHON_VERSION}.tar.xz.asc"
35-
else
36-
fetch_source "Python-${CPYTHON_VERSION}.tar.xz.sigstore" "${CPYTHON_DOWNLOAD_URL}/${CPYTHON_DIST_DIR}"
37-
cosign verify-blob "Python-${CPYTHON_VERSION}.tar.xz" --bundle "Python-${CPYTHON_VERSION}.tar.xz.sigstore" --certificate-identity="${CERT_IDENTITY}" --certificate-oidc-issuer="${CERT_OIDC_ISSUER}"
38-
fi
31+
fetch_source "Python-${CPYTHON_VERSION}.tar.xz.sigstore" "${CPYTHON_DOWNLOAD_URL}/${CPYTHON_DIST_DIR}"
32+
cosign verify-blob "Python-${CPYTHON_VERSION}.tar.xz" --bundle "Python-${CPYTHON_VERSION}.tar.xz.sigstore" --certificate-identity="${CERT_IDENTITY}" --certificate-oidc-issuer="${CERT_OIDC_ISSUER}"
3933

4034
tar -xJf "Python-${CPYTHON_VERSION}.tar.xz"
4135
pushd "Python-${CPYTHON_VERSION}"
@@ -49,11 +43,6 @@ if [ "${4:-}" == "nogil" ]; then
4943
CONFIGURE_ARGS+=(--disable-gil)
5044
fi
5145

52-
if [ "${CPYTHON_VERSION}" == "3.6.15" ]; then
53-
# https://github.com/python/cpython/issues/89863
54-
# gcc-12+ uses these 2 flags in -O2 but they were only enabled in -O3 with gcc-11
55-
CFLAGS_EXTRA="${CFLAGS_EXTRA} -fno-tree-loop-vectorize -fno-tree-slp-vectorize"
56-
fi
5746
if [ "${AUDITWHEEL_POLICY}" == "manylinux2014" ] ; then
5847
# Python 3.11+
5948
export TCLTK_LIBS="-ltk8.6 -ltcl8.6"
@@ -68,7 +57,7 @@ fi
6857
SQLITE_PREFIX=$(find /opt/_internal -maxdepth 1 -name 'sqlite*')
6958
if [ "${SQLITE_PREFIX}" != "" ]; then
7059
case "${CPYTHON_VERSION}" in
71-
3.6.*|3.7.*|3.8.*|3.9.*|3.10.*) sed -i "s|/usr/local/include/sqlite3|/opt/_internal/sqlite3/include|g ; s|sqlite_extra_link_args = ()|sqlite_extra_link_args = ('-Wl,--enable-new-dtags,-rpath=/opt/_internal/sqlite3/lib',)|g" setup.py;;
60+
3.8.*|3.9.*|3.10.*) sed -i "s|/usr/local/include/sqlite3|/opt/_internal/sqlite3/include|g ; s|sqlite_extra_link_args = ()|sqlite_extra_link_args = ('-Wl,--enable-new-dtags,-rpath=/opt/_internal/sqlite3/lib',)|g" setup.py;;
7261
*) ;;
7362
esac
7463
fi
@@ -97,7 +86,7 @@ fi
9786
make > /dev/null
9887
make install > /dev/null
9988
popd
100-
rm -rf "Python-${CPYTHON_VERSION}" "Python-${CPYTHON_VERSION}.tar.xz" "Python-${CPYTHON_VERSION}.tar.xz.sigstore" "Python-${CPYTHON_VERSION}.tar.xz.asc"
89+
rm -rf "Python-${CPYTHON_VERSION}" "Python-${CPYTHON_VERSION}.tar.xz" "Python-${CPYTHON_VERSION}.tar.xz.sigstore"
10190

10291
if [ "${OPENSSL_PREFIX}" != "" ]; then
10392
rm -rf "${OPENSSL_PREFIX:?}/bin" "${OPENSSL_PREFIX}/include" "${OPENSSL_PREFIX}/lib/pkgconfig" "${OPENSSL_PREFIX}/lib/*.so"

0 commit comments

Comments
 (0)