From 515f89934e3b6d5daaa9a54684a4fb374289b978 Mon Sep 17 00:00:00 2001 From: "John H. Palmieri" Date: Sun, 7 Feb 2021 10:25:13 -0800 Subject: [PATCH] sage_setup.docbuild.AllBuilder: stop the non-reference manual docs from being built in parallel --- src/sage_setup/docbuild/__init__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/sage_setup/docbuild/__init__.py b/src/sage_setup/docbuild/__init__.py index b07e9c100cf..1d4139555ec 100644 --- a/src/sage_setup/docbuild/__init__.py +++ b/src/sage_setup/docbuild/__init__.py @@ -286,13 +286,15 @@ def clean(self, *args): from .utils import build_many as _build_many -def build_many(target, args): +def build_many(target, args, processes=None): """ Thin wrapper around `sage_setup.docbuild.utils.build_many` which uses the docbuild settings ``NUM_THREADS`` and ``ABORT_ON_ERROR``. """ + if processes is None: + processes = NUM_THREADS try: - _build_many(target, args, processes=NUM_THREADS) + _build_many(target, args, processes=processes) except BaseException as exc: if ABORT_ON_ERROR: raise @@ -349,7 +351,7 @@ def _wrapper(self, name, *args, **kwds): # build the other documents in parallel L = [(doc, name, kwds) + args for doc in others] - build_many(build_other_doc, L) + build_many(build_other_doc, L, 1) logger.warning("Elapsed time: %.1f seconds."%(time.time()-start)) logger.warning("Done building the documentation!")