diff options
author | Aaron Carlisle <carlisle.b3d@gmail.com> | 2019-07-06 03:17:42 +0300 |
---|---|---|
committer | Aaron Carlisle <carlisle.b3d@gmail.com> | 2019-07-07 00:01:10 +0300 |
commit | 6fad70d5513814ad17c045c3d24da86f7f796005 (patch) | |
tree | edbbe6b5a149c391035f4b5d82b2294d34a30ad3 /doc | |
parent | df5f06cac2224498c9905ff3ea24811f46c09fa6 (diff) |
Cleanup: API Doc Gen: move copying static dir to own function
Diffstat (limited to 'doc')
-rw-r--r-- | doc/python_api/sphinx_doc_gen.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py index cafdefefb20..fc5ab738871 100644 --- a/doc/python_api/sphinx_doc_gen.py +++ b/doc/python_api/sphinx_doc_gen.py @@ -320,8 +320,6 @@ EXTRA_SOURCE_FILES = ( "../../../release/scripts/templates_py/ui_previews_custom_icon.py", "../examples/bmesh.ops.1.py", "../examples/bpy.app.translations.py", - "../static/favicon.ico", - "../static/blender_logo.svg", ) @@ -1637,9 +1635,9 @@ def write_sphinx_conf_py(basepath): fw("html_copy_source = False\n") fw("html_show_sphinx = False\n") fw("html_split_index = True\n") - fw("html_extra_path = ['__/static/favicon.ico', '__/static/blender_logo.svg']\n") - fw("html_favicon = '__/static/favicon.ico'\n") - fw("html_logo = '__/static/blender_logo.svg'\n\n") + fw("html_extra_path = ['static/favicon.ico', 'static/blender_logo.svg']\n") + fw("html_favicon = 'static/favicon.ico'\n") + fw("html_logo = 'static/blender_logo.svg'\n\n") # needed for latex, pdf gen fw("latex_elements = {\n") @@ -1922,6 +1920,12 @@ def copy_handwritten_extra(basepath): shutil.copy2(f_src, f_dst) +def copy_theme_assets(basepath): + shutil.copytree(os.path.join(SCRIPT_DIR, "static"), + os.path.join(basepath, "static"), + copy_function=shutil.copy) + + def rna2sphinx(basepath): try: @@ -1956,6 +1960,9 @@ def rna2sphinx(basepath): # copy source files referenced copy_handwritten_extra(basepath) + # copy extra files needed for theme + copy_theme_assets(basepath) + def align_sphinx_in_to_sphinx_in_tmp(dir_src, dir_dst): ''' |