diff options
author | Jack Lloyd <[email protected]> | 2021-12-26 10:42:47 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2021-12-26 10:42:47 -0500 |
commit | 495fc0b2cc120f9df6ae165e29d425512595b07f (patch) | |
tree | 2c10bd76358606afb5ffcd653fa55ae89b387d24 /src/scripts/build_docs.py | |
parent | a1fde048b4128299cd976fa2deb8f549d4a3303a (diff) |
Disable concurrency with sphinx-build
Sphinx with -j8 on an 8 core machine is 5 seconds *slower* than -j1 :/
Diffstat (limited to 'src/scripts/build_docs.py')
-rwxr-xr-x | src/scripts/build_docs.py | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/src/scripts/build_docs.py b/src/scripts/build_docs.py index 6eb9b656c..85fb6f5d6 100755 --- a/src/scripts/build_docs.py +++ b/src/scripts/build_docs.py @@ -124,37 +124,6 @@ def parse_options(args): return options -def sphinx_supports_concurrency(): - import re - from distutils.version import StrictVersion - - proc = subprocess.Popen(['sphinx-build', '--version'], - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT) - output, _ = proc.communicate() - if isinstance(output, bytes): - output = output.decode('ascii') - output = output.strip() - - # Sphinx v1.1.3 - # sphinx-build 1.7.4 - match = re.match(r'^(?:[a-zA-Z_-]+) v?(([0-9]+)\.([0-9]+))', output) - - if match is None: - # If regex doesn't match, disable by default - logging.warning("Did not recognize sphinx version from '%s'", output) - return False - - version = StrictVersion(match.group(1)) - - if version < StrictVersion('1.4'): - # not supported - return False - if version == StrictVersion('3.0'): - # Bug in Sphinx 3.0 https://github.com/sphinx-doc/sphinx/issues/7438 - return False - return True - def read_config(config): try: f = open(config) @@ -203,8 +172,6 @@ def main(args=None): if with_sphinx: sphinx_build = ['sphinx-build', '-q', '-c', cfg['sphinx_config_dir']] - if sphinx_supports_concurrency(): - sphinx_build += ['-j', str(get_concurrency())] cmds.append(sphinx_build + ['-b', 'html', handbook_src, handbook_output]) |