Skip to content

Commit 9339163

Browse files
humitosstsewd
andauthored
Build: check for pre-compiled build.tools when using ubuntu-lts-latest (#11098)
* Build: check for pre-compiled `build.tools` when using `ubuntu-lts-latest` Related #11081 * Update readthedocs/doc_builder/director.py Co-authored-by: Santos Gallegos <[email protected]> --------- Co-authored-by: Santos Gallegos <[email protected]>
1 parent 40e161d commit 9339163

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

readthedocs/doc_builder/director.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,14 @@ def install_build_tools(self):
491491
# TODO: generate the correct path for the Python version
492492
# see https://github.com/readthedocs/readthedocs.org/pull/8447#issuecomment-911562267
493493
# tool_path = f'{self.config.build.os}/{tool}/2021-08-30/{full_version}.tar.gz'
494-
tool_path = f"{self.data.config.build.os}-{tool}-{full_version}.tar.gz"
494+
495+
build_os = self.data.config.build.os
496+
if build_os == "ubuntu-lts-latest":
497+
_, build_os = settings.RTD_DOCKER_BUILD_SETTINGS["os"][
498+
"ubuntu-lts-latest"
499+
].split(":")
500+
501+
tool_path = f"{build_os}-{tool}-{full_version}.tar.gz"
495502
tool_version_cached = build_tools_storage.exists(tool_path)
496503
if tool_version_cached:
497504
remote_fd = build_tools_storage.open(tool_path, mode="rb")

0 commit comments

Comments
 (0)