Skip to content

Commit

Permalink
Use unique checkouts
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner committed Sep 26, 2024
1 parent 596bfad commit 9aaa470
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ def run(self, http: urllib3.PoolManager) -> bool:
@property
def checkout(self) -> Path:
"""Path to CPython git clone."""
return self.build_root / "cpython"
return self.build_root / _checkout_name(self.select_output)

def clone_translation(self):
self.translation_repo.update()
Expand Down Expand Up @@ -1129,7 +1129,8 @@ def build_docs(args) -> bool:
del args.languages
all_built_successfully = True
cpython_repo = Repository(
"https://github.com/python/cpython.git", args.build_root / "cpython"
"https://github.com/python/cpython.git",
args.build_root / _checkout_name(args.select_output),
)
while todo:
version, language = todo.pop()
Expand Down Expand Up @@ -1184,6 +1185,12 @@ def build_docs(args) -> bool:
return all_built_successfully


def _checkout_name(select_output: str | None) -> str:
if select_output is not None:
return f"cpython-{select_output}"
return "cpython"


def main():
"""Script entry point."""
args = parse_args()
Expand Down

0 comments on commit 9aaa470

Please sign in to comment.