Skip to content

Commit a8981b1

Browse files
authored
Cease building PDF documentation in releases (#295)
1 parent b217961 commit a8981b1

File tree

4 files changed

+19
-22
lines changed

4 files changed

+19
-22
lines changed

.github/workflows/build-release.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -153,23 +153,16 @@ jobs:
153153
- name: "Install docs dependencies"
154154
run: |
155155
python -m pip install -r Doc/requirements.txt
156-
sudo apt-get update
157-
sudo apt-get install --yes --no-install-recommends \
158-
fonts-freefont-otf \
159-
latexmk \
160-
texinfo \
161-
texlive-fonts-extra \
162-
texlive-fonts-recommended \
163-
texlive-latex-base \
164-
texlive-latex-extra \
165-
texlive-latex-recommended \
166-
texlive-xetex \
167-
xindy
168156
169157
- name: "Build docs"
158+
env:
159+
SPHINXOPTS: "-j10"
170160
run: |
171161
cd Doc
172-
SPHINXOPTS="-j10" make dist
162+
make dist-epub
163+
make dist-html
164+
make dist-texinfo
165+
make dist-text
173166
174167
- name: "Upload the docs artifacts"
175168
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2

release.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
import subprocess
2020
import sys
2121
import tempfile
22-
from collections.abc import Generator
22+
from collections.abc import Generator, Sequence
2323
from contextlib import contextmanager
2424
from dataclasses import dataclass
2525
from pathlib import Path
@@ -256,7 +256,7 @@ def error(*msgs: str) -> None:
256256

257257

258258
def run_cmd(
259-
cmd: list[str] | str, silent: bool = False, shell: bool = False, **kwargs: Any
259+
cmd: Sequence[str] | str, silent: bool = False, shell: bool = False, **kwargs: Any
260260
) -> None:
261261
if shell:
262262
cmd = SPACE.join(cmd)
@@ -700,11 +700,17 @@ def build_docs() -> str:
700700
run_cmd([pip, "install", "-r", "Doc/requirements.txt"])
701701
sphinx_build = os.path.join(venv, "bin", "sphinx-build")
702702
blurb = os.path.join(venv, "bin", "blurb")
703+
docs_env = {
704+
**os.environ,
705+
"BLURB": blurb,
706+
"SPHINXBUILD": sphinx_build,
707+
"SPHINXOPTS": "-j10",
708+
}
703709
with pushd("Doc"):
704-
run_cmd(
705-
["make", "dist", "SPHINXBUILD=" + sphinx_build, "BLURB=" + blurb],
706-
env={**os.environ, "SPHINXOPTS": "-j10"},
707-
)
710+
run_cmd(("make", "dist-epub"), env=docs_env)
711+
run_cmd(("make", "dist-html"), env=docs_env)
712+
run_cmd(("make", "dist-texinfo"), env=docs_env)
713+
run_cmd(("make", "dist-text"), env=docs_env)
708714
return os.path.abspath("dist")
709715

710716

run_release.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,6 @@ def wait_for_build_release(db: ReleaseShelf) -> None:
604604
docs_path / f"python-{release_tag}-docs.epub",
605605
docs_path / f"python-{release_tag}-docs-html.tar.bz2",
606606
docs_path / f"python-{release_tag}-docs-html.zip",
607-
docs_path / f"python-{release_tag}-docs-pdf-a4.tar.bz2",
608-
docs_path / f"python-{release_tag}-docs-pdf-a4.zip",
609607
docs_path / f"python-{release_tag}-docs-texinfo.tar.bz2",
610608
docs_path / f"python-{release_tag}-docs-texinfo.zip",
611609
docs_path / f"python-{release_tag}-docs-text.tar.bz2",

tests/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ Documentation
153153
updated daily.
154154

155155
It can also be downloaded in many formats for faster access. The documentation
156-
is downloadable in HTML, PDF, and reStructuredText formats; the latter version
156+
is downloadable in HTML, EPUB, and reStructuredText formats; the latter version
157157
is primarily for documentation authors, translators, and people with special
158158
formatting requirements.
159159

0 commit comments

Comments
 (0)