Skip to content

Commit

Permalink
Add an HTML-only (English) build variant
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Oct 10, 2024
1 parent 134f57c commit 54ac49e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ def parse_args():
)
parser.add_argument(
"--select-output",
choices=("no-html", "only-html"),
choices=("no-html", "only-html", "only-html-en"),
help="Choose what outputs to build.",
)
parser.add_argument(
Expand Down Expand Up @@ -610,7 +610,7 @@ class DocBuilder:
cpython_repo: Repository
build_root: Path
www_root: Path
select_output: Literal["no-html", "only-html"] | None
select_output: Literal["no-html", "only-html", "only-html-en"] | None
quick: bool
group: str
log_directory: Path
Expand All @@ -620,7 +620,9 @@ class DocBuilder:
@property
def html_only(self):
return (
self.select_output == "only-html" or self.quick or self.language.html_only
self.select_output.startswith("only-html")
or self.quick
or self.language.html_only
)

@property
Expand Down Expand Up @@ -1245,6 +1247,8 @@ def main():
build_docs_with_lock(args, "build_docs_archives.lock")
elif args.select_output == "only-html":
build_docs_with_lock(args, "build_docs_html.lock")
elif args.select_output == "only-html-en":
build_docs_with_lock(args, "build_docs_html_en.lock")


def build_docs_with_lock(args: Namespace, lockfile_name: str) -> int:
Expand Down

0 comments on commit 54ac49e

Please sign in to comment.