[Bf-blender-cvs] [a2cadb786f3] blender-v2.93-release: API doc changelog generation: fix issue with version/path.
Bastien Montagne
noreply at git.blender.org
Wed Jul 6 14:47:42 CEST 2022
Commit: a2cadb786f3b0de39fda2626a3f32cfe3e41ed08
Author: Bastien Montagne
Date: Wed Jul 6 14:46:02 2022 +0200
Branches: blender-v2.93-release
https://developer.blender.org/rBa2cadb786f3b0de39fda2626a3f32cfe3e41ed08
API doc changelog generation: fix issue with version/path.
`BLENDER_VERSION_DOTS` has changed since 2.93, in that version of the
codebase it cannot be used directly to get directory in the API doc
matching Blender version.
===================================================================
M doc/python_api/sphinx_doc_gen.py
===================================================================
diff --git a/doc/python_api/sphinx_doc_gen.py b/doc/python_api/sphinx_doc_gen.py
index db6b810762a..61f9dee24bd 100644
--- a/doc/python_api/sphinx_doc_gen.py
+++ b/doc/python_api/sphinx_doc_gen.py
@@ -503,9 +503,11 @@ def generate_changelog():
sphinx_changelog_gen = importlib.util.module_from_spec(spec)
spec.loader.exec_module(sphinx_changelog_gen)
+ _version_dot = "%d.%d" % (bpy.app.version[0], bpy.app.version[1])
+
API_DUMP_INDEX_FILEPATH = ARGS.api_dump_index_path
API_DUMP_ROOT = os.path.dirname(API_DUMP_INDEX_FILEPATH)
- API_DUMP_FILEPATH = os.path.abspath(os.path.join(API_DUMP_ROOT, BLENDER_VERSION_DOTS, "api_dump.json"))
+ API_DUMP_FILEPATH = os.path.abspath(os.path.join(API_DUMP_ROOT, _version_dot, "api_dump.json"))
API_CHANGELOG_FILEPATH = os.path.abspath(os.path.join(SPHINX_IN_TMP, "change_log.rst"))
sphinx_changelog_gen.main(("--", "--indexpath", API_DUMP_INDEX_FILEPATH, "dump", "--filepath-out", API_DUMP_FILEPATH))
More information about the Bf-blender-cvs
mailing list