Skip to content

Commit

Permalink
Make Sphinx to share environment between commands (#11073)
Browse files Browse the repository at this point in the history
Remove the `-E` from Sphinx command so it can shares the saved environment
between commands from the same build.

This will speed up a little those builds that are building multiple formats.

Closes #10701
  • Loading branch information
humitos authored Jan 30, 2024
1 parent 96fc90b commit d20a6f7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
2 changes: 0 additions & 2 deletions readthedocs/doc_builder/backends/sphinx.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ def build(self):
build_command = [
*self.get_sphinx_cmd(),
"-T",
"-E",
]
if self.config.sphinx.fail_on_warning:
build_command.extend(["-W", "--keep-going"])
Expand Down Expand Up @@ -483,7 +482,6 @@ def build(self):
self.run(
*self.get_sphinx_cmd(),
"-T",
"-E",
"-b",
self.sphinx_builder,
"-d",
Expand Down
9 changes: 0 additions & 9 deletions readthedocs/projects/tests/test_build_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,6 @@ def test_build_sphinx_formats(self, load_yaml_config, formats, builders):
"-m",
"sphinx",
"-T",
"-E",
"-b",
"html",
"-d",
Expand All @@ -212,7 +211,6 @@ def test_build_sphinx_formats(self, load_yaml_config, formats, builders):
"-m",
"sphinx",
"-T",
"-E",
"-b",
builder,
"-d",
Expand Down Expand Up @@ -829,7 +827,6 @@ def test_build_commands_executed(
"-m",
"sphinx",
"-T",
"-E",
"-b",
"html",
"-d",
Expand All @@ -846,7 +843,6 @@ def test_build_commands_executed(
"-m",
"sphinx",
"-T",
"-E",
"-b",
"readthedocssinglehtmllocalmedia",
"-d",
Expand Down Expand Up @@ -891,7 +887,6 @@ def test_build_commands_executed(
"-m",
"sphinx",
"-T",
"-E",
"-b",
"latex",
"-d",
Expand All @@ -911,7 +906,6 @@ def test_build_commands_executed(
"-m",
"sphinx",
"-T",
"-E",
"-b",
"epub",
"-d",
Expand Down Expand Up @@ -1467,7 +1461,6 @@ def test_sphinx_normalized_language(self, load_yaml_config):
"-m",
"sphinx",
"-T",
"-E",
"-W", # fail on warning flag
"--keep-going", # fail on warning flag
"-b",
Expand Down Expand Up @@ -1506,7 +1499,6 @@ def test_sphinx_fail_on_warning(self, load_yaml_config):
"-m",
"sphinx",
"-T",
"-E",
"-W", # fail on warning flag
"--keep-going", # fail on warning flag
"-b",
Expand Down Expand Up @@ -1843,7 +1835,6 @@ def test_sphinx_builder(self, load_yaml_config, value, command):
"-m",
"sphinx",
"-T",
"-E",
"-b",
command,
"-d",
Expand Down

0 comments on commit d20a6f7

Please sign in to comment.