Skip to content

Commit 5ac8ae9

Browse files
authored
Add an HTML-only (English) build variant (#219)
1 parent 134f57c commit 5ac8ae9

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

build_docs.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ def parse_args():
504504
)
505505
parser.add_argument(
506506
"--select-output",
507-
choices=("no-html", "only-html"),
507+
choices=("no-html", "only-html", "only-html-en"),
508508
help="Choose what outputs to build.",
509509
)
510510
parser.add_argument(
@@ -610,7 +610,7 @@ class DocBuilder:
610610
cpython_repo: Repository
611611
build_root: Path
612612
www_root: Path
613-
select_output: Literal["no-html", "only-html"] | None
613+
select_output: Literal["no-html", "only-html", "only-html-en"] | None
614614
quick: bool
615615
group: str
616616
log_directory: Path
@@ -620,7 +620,9 @@ class DocBuilder:
620620
@property
621621
def html_only(self):
622622
return (
623-
self.select_output == "only-html" or self.quick or self.language.html_only
623+
self.select_output in {"only-html", "only-html-en"}
624+
or self.quick
625+
or self.language.html_only
624626
)
625627

626628
@property
@@ -1245,6 +1247,8 @@ def main():
12451247
build_docs_with_lock(args, "build_docs_archives.lock")
12461248
elif args.select_output == "only-html":
12471249
build_docs_with_lock(args, "build_docs_html.lock")
1250+
elif args.select_output == "only-html-en":
1251+
build_docs_with_lock(args, "build_docs_html_en.lock")
12481252

12491253

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

0 commit comments

Comments
 (0)