Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2016-11-13 14:03:28 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-11-13 14:06:26 +0300
commit7e8bf9dbd6836bf71a87c787a92768f78cb68e89 (patch)
tree0397a708632a8b59c497cfe9e2548f135a7a3c8f /doc
parentcc8132b0c83e60d46e24ecec93744f0dd2b5db90 (diff)
Fix T50007: blender offline python documentation in zipped HTML files, not shown correctly.
Stupid mistake, os.scandir is not recursive... Patch by @brecht, thanks.
Diffstat (limited to 'doc')
-rwxr-xr-xdoc/python_api/sphinx_doc_update.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/doc/python_api/sphinx_doc_update.py b/doc/python_api/sphinx_doc_update.py
index 5301f39b2e3..c7f0367a2a0 100755
--- a/doc/python_api/sphinx_doc_update.py
+++ b/doc/python_api/sphinx_doc_update.py
@@ -142,8 +142,11 @@ def main():
zip_name = "blender_python_reference_%s" % blenver_zip # We can't use 'release' postfix here...
zip_path = os.path.join(args.mirror_dir, zip_name)
with zipfile.ZipFile(zip_path, 'w') as zf:
- for de in os.scandir(api_dir):
- zf.write(de.path, arcname=os.path.join(zip_name, de.name))
+ for dirname, _, filenames in os.walk(api_dir):
+ for filename in filenames:
+ filepath = os.path.join(dirname, filename)
+ zip_filepath = os.path.join(zip_name, os.path.relpath(filepath, api_dir))
+ zf.write(filepath, arcname=zip_filepath)
os.rename(zip_path, os.path.join(api_dir, "%s.zip" % zip_name))
# VII) Create symlinks and html redirects.