From 5665f00afd239ec6f7dbdb04a35343c5d309ac75 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Tue, 21 Oct 2025 12:30:20 +0100 Subject: [PATCH 1/4] Cease building PDF documentation in releases --- release.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/release.py b/release.py index 8652c23b..7b92e075 100755 --- a/release.py +++ b/release.py @@ -700,11 +700,15 @@ def build_docs() -> str: run_cmd([pip, "install", "-r", "Doc/requirements.txt"]) sphinx_build = os.path.join(venv, "bin", "sphinx-build") blurb = os.path.join(venv, "bin", "blurb") + docs_env = { + **os.environ, + "BLURB": blurb, + "SPHINXBUILD": sphinx_build, + "SPHINXOPTS": "-j10", + } with pushd("Doc"): - run_cmd( - ["make", "dist", "SPHINXBUILD=" + sphinx_build, "BLURB=" + blurb], - env={**os.environ, "SPHINXOPTS": "-j10"}, - ) + run_cmd(("make", "dist-html"), env=docs_env) + run_cmd(("make", "dist-no-html"), env=docs_env) return os.path.abspath("dist") From cbabea7acfdc822cc3bc84ed33335db31db4fd12 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Tue, 21 Oct 2025 12:33:49 +0100 Subject: [PATCH 2/4] placate the type checker --- release.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release.py b/release.py index 7b92e075..45d6ee31 100755 --- a/release.py +++ b/release.py @@ -19,7 +19,7 @@ import subprocess import sys import tempfile -from collections.abc import Generator +from collections.abc import Generator, Sequence from contextlib import contextmanager from dataclasses import dataclass from pathlib import Path @@ -256,7 +256,7 @@ def error(*msgs: str) -> None: def run_cmd( - cmd: list[str] | str, silent: bool = False, shell: bool = False, **kwargs: Any + cmd: Sequence[str] | str, silent: bool = False, shell: bool = False, **kwargs: Any ) -> None: if shell: cmd = SPACE.join(cmd) From c09dd4e3147b3e73cda6a294a477c76eaadd24fa Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Tue, 21 Oct 2025 12:52:15 +0100 Subject: [PATCH 3/4] Hugo's review --- .github/workflows/build-release.yml | 5 ++++- release.py | 4 +++- run_release.py | 2 -- tests/README.rst | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 2bb5f2ff..1131ac6b 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -169,7 +169,10 @@ jobs: - name: "Build docs" run: | cd Doc - SPHINXOPTS="-j10" make dist + SPHINXOPTS="-j10" make dist-epub + SPHINXOPTS="-j10" make dist-html + SPHINXOPTS="-j10" make dist-texinfo + SPHINXOPTS="-j10" make dist-text - name: "Upload the docs artifacts" uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 diff --git a/release.py b/release.py index 45d6ee31..20feb4cf 100755 --- a/release.py +++ b/release.py @@ -707,8 +707,10 @@ def build_docs() -> str: "SPHINXOPTS": "-j10", } with pushd("Doc"): + run_cmd(("make", "dist-epub"), env=docs_env) run_cmd(("make", "dist-html"), env=docs_env) - run_cmd(("make", "dist-no-html"), env=docs_env) + run_cmd(("make", "dist-texinfo"), env=docs_env) + run_cmd(("make", "dist-text"), env=docs_env) return os.path.abspath("dist") diff --git a/run_release.py b/run_release.py index 74b43965..852ce952 100755 --- a/run_release.py +++ b/run_release.py @@ -604,8 +604,6 @@ def wait_for_build_release(db: ReleaseShelf) -> None: docs_path / f"python-{release_tag}-docs.epub", docs_path / f"python-{release_tag}-docs-html.tar.bz2", docs_path / f"python-{release_tag}-docs-html.zip", - docs_path / f"python-{release_tag}-docs-pdf-a4.tar.bz2", - docs_path / f"python-{release_tag}-docs-pdf-a4.zip", docs_path / f"python-{release_tag}-docs-texinfo.tar.bz2", docs_path / f"python-{release_tag}-docs-texinfo.zip", docs_path / f"python-{release_tag}-docs-text.tar.bz2", diff --git a/tests/README.rst b/tests/README.rst index 02776205..2d313c39 100644 --- a/tests/README.rst +++ b/tests/README.rst @@ -153,7 +153,7 @@ Documentation updated daily. It can also be downloaded in many formats for faster access. The documentation -is downloadable in HTML, PDF, and reStructuredText formats; the latter version +is downloadable in HTML, EPUB, and reStructuredText formats; the latter version is primarily for documentation authors, translators, and people with special formatting requirements. From 50fafc893707600d6bcc17003bce7f56134ab196 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+aa-turner@users.noreply.github.com> Date: Tue, 21 Oct 2025 13:15:33 +0100 Subject: [PATCH 4/4] Bin LaTeX apt packages --- .github/workflows/build-release.yml | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 1131ac6b..cddcd301 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -153,26 +153,16 @@ jobs: - name: "Install docs dependencies" run: | python -m pip install -r Doc/requirements.txt - sudo apt-get update - sudo apt-get install --yes --no-install-recommends \ - fonts-freefont-otf \ - latexmk \ - texinfo \ - texlive-fonts-extra \ - texlive-fonts-recommended \ - texlive-latex-base \ - texlive-latex-extra \ - texlive-latex-recommended \ - texlive-xetex \ - xindy - name: "Build docs" + env: + SPHINXOPTS: "-j10" run: | cd Doc - SPHINXOPTS="-j10" make dist-epub - SPHINXOPTS="-j10" make dist-html - SPHINXOPTS="-j10" make dist-texinfo - SPHINXOPTS="-j10" make dist-text + make dist-epub + make dist-html + make dist-texinfo + make dist-text - name: "Upload the docs artifacts" uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2