[Bf-blender-cvs] [379ee3e5277] master: PY API doc generation: Add option for multi-tasking sphinx.

Bastien Montagne noreply at git.blender.org
Mon Feb 10 12:38:08 CET 2020


Commit: 379ee3e52779050c63f531454c9c60e310601e77
Author: Bastien Montagne
Date:   Mon Feb 10 12:37:15 2020 +0100
Branches: master
https://developer.blender.org/rB379ee3e52779050c63f531454c9c60e310601e77

PY API doc generation: Add option for multi-tasking sphinx.

===================================================================

M	doc/python_api/sphinx_doc_update.py

===================================================================

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)



More information about the Bf-blender-cvs mailing list