Skip to content

Commit 9b3bfe5

Browse files
committed
Make changes for Python 3.13
1 parent fd5d2f4 commit 9b3bfe5

7 files changed

+43
-433
lines changed

Dockerfile

Lines changed: 18 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
2-
ARG PYTHON_NAME="python3.12"
3-
ARG PYTHON_VERSION="3.12.8-3"
2+
ARG PYTHON_NAME="python3.13"
3+
ARG PYTHON_VERSION="3.13.2-1"
44
ARG DIST_NAME="trixie"
55

66
# -------------------- Preparation --------------------
@@ -16,7 +16,7 @@ Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg" \
1616
RUN echo "\
1717
Package: *\n\
1818
Pin: release n=${DIST_NAME}\n\
19-
Pin-Priority: 1 \n\
19+
Pin-Priority: 1\n\
2020
\n\
2121
Package: libjs-sphinxdoc sphinx-common python3-sphinx python3-docs-theme python-babel-localedata docutils-common python3-alabaster python3-babel python3-docutils python3-pygments python3-requests\n\
2222
Pin: release n=${DIST_NAME}\n\
@@ -57,28 +57,20 @@ FROM pre-build AS build-system
5757
# This command is allowed to fail however if something changes in the future
5858
RUN apt-get install -y --no-install-recommends \
5959
diffstat docutils-common ed fontconfig-config fonts-dejavu-core libbrotli1 \
60-
libbsd0 libc-l10n libdrm-amdgpu1 libdrm-common libdrm-intel1 libdrm-nouveau2 \
61-
libdrm-radeon1 libdrm2 libedit2 libfontconfig1 libfontenc1 libfreetype6 libgl1 \
62-
libgl1-mesa-dri libglapi-mesa libglvnd0 libglx-mesa0 libglx0 libice6 \
63-
libjs-jquery libjs-sphinxdoc libjs-underscore libjson-perl libllvm15 \
64-
libpciaccess0 libpixman-1-0 libpkgconf3 libpng16-16 libsensors-config \
65-
libsensors5 libsm6 libtcl8.6 libtext-unidecode-perl libtk8.6 libunwind8 \
66-
libx11-6 libx11-data libx11-xcb1 libxau6 libxaw7 libxcb-dri2-0 libxcb-dri3-0 \
67-
libxcb-glx0 libxcb-present0 libxcb-randr0 libxcb-shm0 libxcb-sync1 \
68-
libxcb-xfixes0 libxcb1 libxdmcp6 libxext6 libxfixes3 libxfont2 libxft2 \
69-
libxkbfile1 libxml-libxml-perl libxml-namespacesupport-perl \
70-
libxml-sax-base-perl libxml-sax-perl libxmu6 libxmuu1 libxpm4 libxrandr2 \
71-
libxrender1 libxshmfence1 libxss1 libxt6 libxxf86vm1 libz3-4 locales-all \
72-
lsb-release net-tools pkgconf-bin python-babel-localedata python3-alabaster \
73-
python3-babel python3-certifi python3-chardet python3-charset-normalizer \
74-
python3-distutils python3-docs-theme python3-docutils python3-idna \
75-
python3-imagesize python3-jinja2 python3-lib2to3 python3-markupsafe \
76-
python3-packaging python3-pkg-resources python3-pygments python3-requests \
77-
python3-roman python3-six python3-snowballstemmer python3-sphinx python3-tz \
78-
python3-urllib3 quilt sgml-base sharutils sphinx-common tcl tcl8.6 tex-common \
79-
texinfo time tk tk8.6 ucf x11-common x11-xkb-utils x11proto-core-dev \
80-
x11proto-dev xauth xkb-data xml-core xorg-sgml-doctools xserver-common \
81-
xtrans-dev xvfb || \
60+
libbsd0 libc-l10n libfontconfig1 libfreetype6 libjs-jquery libjson-perl \
61+
libjs-sphinxdoc libjs-underscore libpkgconf3 libpng16-16 libtcl8.6 \
62+
libtext-unidecode-perl libtk8.6 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6 \
63+
libxext6 libxft2 libxml-libxml-perl libxml-namespacesupport-perl \
64+
libxml-sax-base-perl libxml-sax-perl libxrender1 libxss1 locales-all \
65+
lsb-release net-tools pkgconf-bin python3-alabaster python3-babel \
66+
python3-certifi python3-chardet python3-charset-normalizer python3-defusedxml \
67+
python3-docs-theme python3-docutils python3-idna python3-imagesize \
68+
python3-jinja2 python3-markupsafe python3-packaging python3-pkg-resources \
69+
python3-pygments python3-requests python3-roman python3-six \
70+
python3-snowballstemmer python3-sphinx python3-urllib3 python-babel-localedata \
71+
quilt sgml-base sharutils sphinx-common tcl tcl8.6 tex-common texinfo time tk \
72+
tk8.6 ucf x11-common x11proto-core-dev x11proto-dev xml-core xorg-sgml-doctools \
73+
xtrans-dev || \
8274
echo "::warning::Loading packages failed!" | tee -a /github_output
8375
COPY --from=source /usr/local/src/python-source /usr/local/src/python-source
8476
WORKDIR /usr/local/src/python-source
@@ -113,7 +105,7 @@ RUN cd native-debs && apt-get install -y ./lib${PYTHON_NAME}-minimal*.deb \
113105
./${PYTHON_NAME}-minimal*.deb \
114106
./${PYTHON_NAME}_*.deb
115107

116-
RUN DEB_BUILD_PROFILES='nocheck nobench' mk-build-deps --arch ${ARCH} --host-arch ${ARCH}
108+
RUN DEB_BUILD_PROFILES='nocheck nobench' DEB_BUILD_OPTIONS='nocheck nobench' mk-build-deps --arch ${ARCH} --host-arch ${ARCH}
117109
# We don't need build-essential for cross-compiling, but mk-build-deps insists of adding it
118110
# Hacky way to remove that:
119111
RUN mkdir rebuild-cross-deps && \

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Python 3.12 backport for Debian 12 bookworm
2-
The aim of this project is to provide a Python 3.12 backport to Debian bookworm. Packages are of course much better manageable than compiling the source from scratch. In my opinion it is also more manageable than using `pyenv`. By using my packages you will also be sure to get the latest patches (on a best effort basis).
1+
# Python 3.13 backport for Debian 12 bookworm
2+
The aim of this project is to provide a Python 3.13 backport to Debian bookworm. Packages are of course much better manageable than compiling the source from scratch. In my opinion it is also more manageable than using `pyenv`. By using my packages you will also be sure to get the latest patches (on a best effort basis).
33

4-
Motivation for this project was the [removal of Python 3.11 support in Home Assistant 2024.4](https://github.com/home-assistant/core/pull/108160). Debian bookworm doesn't have Python 3.12 however.
4+
Motivation for this project was the [removal of Python 3.12 support in Home Assistant 2025.2](https://github.com/home-assistant/core/pull/130425). Debian bookworm doesn't have Python 3.13 however.
55

66
## Scope
7-
The scope of this project is limited to backporting just Python 3.12 itself. So no defaults (which provide virtual packages so `python3` get's automatically linked to `python3.12`) and no precompiled pip-packages or wheels besides pip itself. Therefore it can coexist with your regular Python (3.11) installation without any interference and still being simple to maintain. It's main use is for in virtual environments where you can use pip to compile and install any packages you desire. It does provide all the packages and dependencies needed to create a Python 3.12 virtual environment.
7+
The scope of this project is limited to backporting just Python 3.13 itself. So no defaults (which provide virtual packages so `python3` get's automatically linked to `python3.13`) and no precompiled pip-packages or wheels besides pip itself. Therefore it can coexist with your regular Python (3.11) installation without any interference and still being simple to maintain. It's main use is for in virtual environments where you can use pip to compile and install any packages you desire. It does provide all the packages and dependencies needed to create a Python 3.13 virtual environment.
88

9-
Because the version of pip present in Debian 12 bookworm isn't compatible with Python 3.12, I've included pip inside the Python package. Normally pip on Debian is inside the `python3-pip` package, but backporting that would clash with an existing pip installation. This is the easiest solution for now.
9+
Because the version of pip present in Debian 12 bookworm isn't compatible with Python 3.13, I've included pip inside the Python package. Normally pip on Debian is inside the `python3-pip` package, but backporting that would clash with an existing pip installation. This is the easiest solution for now.
1010

1111
## Repository
1212
Packages can be downloaded from my repository at `deb.pascalroeleven.nl`. First you should also add my PGP (which you can get from my website via https) to APT's sources keyring:
@@ -18,14 +18,14 @@ Now you can add my repository by adding a file with my repository to the `source
1818
```sh
1919
cat <<EOF | sudo tee /etc/apt/sources.list.d/pascalroeleven.sources
2020
Types: deb
21-
URIs: http://deb.pascalroeleven.nl/python3.12
21+
URIs: http://deb.pascalroeleven.nl/python3.13
2222
Suites: bookworm-backports
2323
Components: main
2424
Signed-By: /etc/apt/keyrings/deb-pascalroeleven.gpg
2525
EOF
2626
```
2727

28-
After running `apt update` you should now be able to install Python 3.12 related packages.
28+
After running `apt update` you should now be able to install Python 3.13 related packages.
2929

3030
Packages are built using Github Actions along with a file containing the checksums of all packages. Therefore, you can compare the checksums of the packages in the repository with the checksums in Github Actions and trace the entire process (up to 90 days after the build after which the artifacts and logs get removed). This way, if you trust the Github Actions build system, you can be sure that the packages I provide are actually built using the instructions in this repo.
3131

@@ -47,4 +47,4 @@ You can supply the following environment variables to modify the changelog: `NAM
4747
NAME="James Smith" EMAIL="jamessmith@example.org" CHANGE="Fixed some bug somewhere" docker buildx bake default
4848
```
4949

50-
Building natively takes about 2 hours on a modern decent PC because of the extensive testing. Cross building takes about 30 minutes (but uses native binaries so requires the extra 2 hours the first time).
50+
Building natively takes about 2 hours on a modern decent PC because of the extensive testing. Cross building takes about 30 minutes (but uses native binaries so requires the extra 2 hours the first time).

patches/0003-Revert-Fix-override-files-for-renamed-t64-packages.diff

Lines changed: 0 additions & 61 deletions
This file was deleted.

0 commit comments

Comments
 (0)