[Soc-2017-dev] Weekly Report #08 - Package Manager

dr. Sybren A. Stüvel sybren at blender.studio
Wed Aug 9 09:59:05 CEST 2017


On 09/08/17 01:08, Ellwood Zwovic wrote:
>>> * Putting the package manager addon in a python package puts the addon
>>> itself under a subdirectory, so blender won't recognize it when the
>>> whole repository is placed in a submodule in scripts/addons. The blender
>>> cloud addon also seems to have the same issue, how was this solved there?
>> I'm not sure what you mean. The Blender Cloud add-on is just a regular
>> Python package that is recognised by Blender.
> The addon part of the blender cloud addon is in a subdirectory of the 
> repository: blender-cloud-addon/blender_cloud.

This is a subdirectory of the *source* repository. Note that this is
*not* the same as the final installation directory structure.

> If I want to put that repository in blender/scripts/addons as a submodule, I end up with 
> blender/scripts/addons/blender-cloud-addon/blender_cloud/__init__.py, 
> and blender doesn't seem to pick up on it.

That is because you're copying the *source* repository and treating it
as the installed add-on. Read the README.md, section "Building an
installable ZIP file". In short, running "python3 setup.py bdist"
creates an installable ZIP file. This is the file that should be
installed by Blender and distributed as package.


-- 
Sybren A. Stüvel

https://cloud.blender.org/
https://blender.studio/


More information about the Soc-2017-dev mailing list