diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml index 2bb5f2ff..cddcd301 100644 --- a/.github/workflows/build-release.yml +++ b/.github/workflows/build-release.yml @@ -153,23 +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 + 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 diff --git a/release.py b/release.py index 8652c23b..20feb4cf 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) @@ -700,11 +700,17 @@ 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-epub"), env=docs_env) + run_cmd(("make", "dist-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.