Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an HTML-only (English) build variant #219

Merged
merged 2 commits into from
Oct 10, 2024
Merged
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
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 in {"only-html", "only-html-en"}
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