Skip to content

Commit

Permalink
Skip running default commands when GENRIC doctool (#11863)
Browse files Browse the repository at this point in the history
Continues the work done in #11852 to allow builds without `sphinx` or
`mkdocs` config keys to work.
  • Loading branch information
humitos authored Dec 17, 2024
1 parent c20e209 commit 8e7efe0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 19 deletions.
11 changes: 11 additions & 0 deletions readthedocs/doc_builder/director.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,12 @@ def create_environment(self):
if self.data.config.build.jobs.create_environment is not None:
self.run_build_job("create_environment")
return

# If the builder is generic, we have nothing to do here,
# as the commnads are provided by the user.
if self.data.config.doctype == GENERIC:
return

self.language_environment.setup_base()

# Install
Expand All @@ -315,6 +321,11 @@ def install(self):
self.run_build_job("install")
return

# If the builder is generic, we have nothing to do here,
# as the commnads are provided by the user.
if self.data.config.doctype == GENERIC:
return

self.language_environment.install_core_requirements()
self.language_environment.install_requirements()

Expand Down
19 changes: 0 additions & 19 deletions readthedocs/projects/tests/test_build_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1327,25 +1327,6 @@ def test_build_jobs_partial_build_override_without_sphinx(self, load_yaml_config
"virtualenv",
"setuptools",
),
mock.call(
"python",
"-mvirtualenv",
"$READTHEDOCS_VIRTUALENV_PATH",
bin_path=None,
cwd=None,
),
mock.call(
mock.ANY,
"-m",
"pip",
"install",
"--upgrade",
"--no-cache-dir",
"pip",
"setuptools",
bin_path=mock.ANY,
cwd=mock.ANY,
),
mock.call(
"echo build html",
escape_command=False,
Expand Down

0 comments on commit 8e7efe0

Please sign in to comment.