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

Ellwood Zwovic gandalf3 at blendermonkey.com
Sat Aug 5 10:59:24 CEST 2017


My report from the wiki: 
https://wiki.blender.org/index.php/User:Gandalf3/GSoC_2017/Reports#Week_10

== Week 10 ==

What I did this week:

* Set up a windows box and got blender building on windows (this took an 
annoying amount of time, spontaneous system updates interrupting 
downloads didn't help..)

* Investigated progress display
** I want to expose an api for doing real progress bars from python, but 
on the advice of ideasman42 I've decided to hold off for now and use 
existing wm.progress* methods.

* Looked into multiprocessing issue on windows (the 'spawn' method).
** I solved the problem from last week by telling multiprocessing to use 
bpy.app.binary_path_python as the interpreter. However, I encountered 
subsequent issues:
*** Multiprocessing re-executes the module which spawns the subprocess 
in the new process. This is a problem if that module uses bpy, as (of 
course) bpy cannot be imported outside of blender. As we at least need 
bpy to determine the interpreter path, we have to make a special 
bpy-free module and pass the interpreter path to it. This seems like an 
awkward workaround to say the least.. And that only revealed another issue:
*** Multiprocessing then dies with a FileNotFoundError: 
'/path/to/blender/dir/<blender string>'. I'm not sure what causes this 
or if it's worth finding out (this might not even be the last issue in 
the chain)

After talking with ideasman42 (who provided a working 
multiprocessing-less subprocess example), I'm planning to avoid using 
multiprocessing inside blender and spawn subprocesses directly.

=== Plans for next week ===

Begin work on multi-repository support. Currently the addon just stores 
a list of packages, to support multiple repositories it should deal with 
repository objects.
Refactor multiprocessing code to spawn subprocesses directly and 
communicate with json serialized objects.



More information about the Soc-2017-dev mailing list