|
19 | 19 | import subprocess |
20 | 20 | import sys |
21 | 21 | import tempfile |
22 | | -from collections.abc import Generator |
| 22 | +from collections.abc import Generator, Sequence |
23 | 23 | from contextlib import contextmanager |
24 | 24 | from dataclasses import dataclass |
25 | 25 | from pathlib import Path |
@@ -256,7 +256,7 @@ def error(*msgs: str) -> None: |
256 | 256 |
|
257 | 257 |
|
258 | 258 | 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 |
260 | 260 | ) -> None: |
261 | 261 | if shell: |
262 | 262 | cmd = SPACE.join(cmd) |
@@ -700,11 +700,17 @@ def build_docs() -> str: |
700 | 700 | run_cmd([pip, "install", "-r", "Doc/requirements.txt"]) |
701 | 701 | sphinx_build = os.path.join(venv, "bin", "sphinx-build") |
702 | 702 | blurb = os.path.join(venv, "bin", "blurb") |
| 703 | + docs_env = { |
| 704 | + **os.environ, |
| 705 | + "BLURB": blurb, |
| 706 | + "SPHINXBUILD": sphinx_build, |
| 707 | + "SPHINXOPTS": "-j10", |
| 708 | + } |
703 | 709 | 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) |
708 | 714 | return os.path.abspath("dist") |
709 | 715 |
|
710 | 716 |
|
|
0 commit comments