Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 6 additions & 13 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
18 changes: 12 additions & 6 deletions release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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")


Expand Down
2 changes: 0 additions & 2 deletions run_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion tests/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down