|
6 | 6 | import os |
7 | 7 | import sys |
8 | 8 |
|
9 | | -from sphinx import application, build_main, locale |
| 9 | +from sphinx import application, locale |
| 10 | +from sphinx.cmd.build import build_main |
10 | 11 | from sphinx.builders.html import StandaloneHTMLBuilder |
11 | 12 | from sphinx.config import Config as SphinxConfig |
12 | 13 | from sphinx.errors import SphinxError |
@@ -234,7 +235,7 @@ def build(source, target, versions, current_name, is_root): |
234 | 235 | :param bool is_root: Is this build in the web root? |
235 | 236 | """ |
236 | 237 | log = logging.getLogger(__name__) |
237 | | - argv = ('sphinx-build', source, target) |
| 238 | + argv = (source, target) |
238 | 239 | config = Config.from_context() |
239 | 240 |
|
240 | 241 | log.debug('Running sphinx-build for %s with args: %s', current_name, str(argv)) |
@@ -262,7 +263,7 @@ def read_config(source, current_name): |
262 | 263 | config = Config.from_context() |
263 | 264 |
|
264 | 265 | with TempDir() as temp_dir: |
265 | | - argv = ('sphinx-build', source, temp_dir) |
| 266 | + argv = (source, temp_dir) |
266 | 267 | log.debug('Running sphinx-build for config values with args: %s', str(argv)) |
267 | 268 | child = multiprocessing.Process(target=_read_config, args=(argv, config, current_name, queue)) |
268 | 269 | child.start() |
|
0 commit comments