From 379ee3e52779050c63f531454c9c60e310601e77 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Mon, 10 Feb 2020 12:37:15 +0100 Subject: PY API doc generation: Add option for multi-tasking sphinx. --- doc/python_api/sphinx_doc_update.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/python_api/sphinx_doc_update.py b/doc/python_api/sphinx_doc_update.py index 78bfd3c85b8..d3f42b1d26f 100755 --- a/doc/python_api/sphinx_doc_update.py +++ b/doc/python_api/sphinx_doc_update.py @@ -27,7 +27,7 @@ You'll need to specify your user login and password, obviously. Example usage: - ./sphinx_doc_update.py --mirror ../../../docs/remote_api_backup/ --source ../.. --blender ../../../build_cmake/bin/blender --user foobar --password barfoo + ./sphinx_doc_update.py --jobs 16 --mirror ../../../docs/remote_api_backup/ --source ../.. --blender ../../../build_cmake/bin/blender --user foobar --password barfoo """ @@ -82,6 +82,10 @@ def argparse_create(): "--password", dest="password", metavar='PASSWORD', type=str, required=True, help=("Password to login on rsync server")) + parser.add_argument( + "--jobs", dest="jobs_nr", + metavar='NR', type=int, required=False, default=1, + help="Number of sphinx building jobs to launch in parallel") return parser @@ -141,7 +145,7 @@ def main(): # IV) Build doc. curr_dir = os.getcwd() os.chdir(tmp_dir) - sphinx_cmd = ("sphinx-build", "-b", "html", "sphinx-in", "sphinx-out") + sphinx_cmd = ("sphinx-build", "-j", str(args.jobs_nr), "-b", "html", "sphinx-in", "sphinx-out") subprocess.run(sphinx_cmd) shutil.rmtree(os.path.join("sphinx-out", ".doctrees")) os.chdir(curr_dir) -- cgit v1.2.3