Skip to content

Commit

Permalink
Build: check for pre-compiled build.tools when using `ubuntu-lts-la…
Browse files Browse the repository at this point in the history
…test` (#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 <stsewd@proton.me>

---------

Co-authored-by: Santos Gallegos <stsewd@proton.me>
  • Loading branch information
humitos and stsewd committed Feb 7, 2024
1 parent 40e161d commit 9339163
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion readthedocs/doc_builder/director.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,14 @@ def install_build_tools(self):
# TODO: generate the correct path for the Python version
# see https://github.com/readthedocs/readthedocs.org/pull/8447#issuecomment-911562267
# tool_path = f'{self.config.build.os}/{tool}/2021-08-30/{full_version}.tar.gz'
tool_path = f"{self.data.config.build.os}-{tool}-{full_version}.tar.gz"

build_os = self.data.config.build.os
if build_os == "ubuntu-lts-latest":
_, build_os = settings.RTD_DOCKER_BUILD_SETTINGS["os"][
"ubuntu-lts-latest"
].split(":")

tool_path = f"{build_os}-{tool}-{full_version}.tar.gz"
tool_version_cached = build_tools_storage.exists(tool_path)
if tool_version_cached:
remote_fd = build_tools_storage.open(tool_path, mode="rb")
Expand Down

0 comments on commit 9339163

Please sign in to comment.