Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 9aaa470

Browse files
committed
Use unique checkouts
1 parent 596bfad commit 9aaa470

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

build_docs.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ def run(self, http: urllib3.PoolManager) -> bool:
630630
@property
631631
def checkout(self) -> Path:
632632
"""Path to CPython git clone."""
633-
return self.build_root / "cpython"
633+
return self.build_root / _checkout_name(self.select_output)
634634

635635
def clone_translation(self):
636636
self.translation_repo.update()
@@ -1129,7 +1129,8 @@ def build_docs(args) -> bool:
11291129
del args.languages
11301130
all_built_successfully = True
11311131
cpython_repo = Repository(
1132-
"https://github.com/python/cpython.git", args.build_root / "cpython"
1132+
"https://github.com/python/cpython.git",
1133+
args.build_root / _checkout_name(args.select_output),
11331134
)
11341135
while todo:
11351136
version, language = todo.pop()
@@ -1184,6 +1185,12 @@ def build_docs(args) -> bool:
11841185
return all_built_successfully
11851186

11861187

1188+
def _checkout_name(select_output: str | None) -> str:
1189+
if select_output is not None:
1190+
return f"cpython-{select_output}"
1191+
return "cpython"
1192+
1193+
11871194
def main():
11881195
"""Script entry point."""
11891196
args = parse_args()

0 commit comments

Comments
 (0)