[Bf-python] Including 3rd party modules in a Blender addon

Jose Juan Tapia jjtapia at gmail.com
Thu Apr 10 17:48:59 CEST 2014


Hello everyone,

I wish to include the libsbml library in one of my blender addons. Although
i was able to succesfully do this in Linux, I'm having problems getting it
to load in blender's python in my Windows box. After writing to the libsbml
library developers, they came back with the following response

>>all the third party dependencies are statically linked into the libSBML
python bindings. So from our side all that is needed is the> >>_libsbml.pyd
as well as the __init__.py script. The _libsbml.pyd that we build depends
however on the specific python version. That is why we need to distribute
so many different versions of it.

>>When I looked at Blender it seemed to be using Python 3.3.0. (Which is
unfortunately the only python binaries we do not currently >>distribute).
So i went ahead and created a set of binaries for the 'official' python
3.3. Looking at the dependencies, it depends on >>python33.dll and
python3.dll. However, Blender only comes along with the python33.dll.

>>the best thing to do would be to be able to link directly against the
library that blender uses, unfortunately there are no lib files
>>distributed with blender. So i'm afraid I cannot help there. It would
help to know how precisely they built the numpy module they >>distribute
and then use the same build procedure for libSBML.


My specific questions  would then be

1. whether it's possible to either get python3.dll from the official python
distribution and use it with blender, or
2. if there is a set of lib's that blender uses that I could compile my own
version of libsbml against so that I can include it in my addon. 3.
Alternatively, what are the set of steps that one needs to follow to
compile a library against Blender python's libs and dlls (for example, like
the cited mail states, how was Blender's numpy compiled).

Thanks for the help. Yours,


-- 
José Juan Tapia Valenzuela
Research Associate
University of Pittsburgh
3076.1 Biological Sciences Tower 3
Pittsburgh, PA 15260
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20140410/79808fa2/attachment.html>


More information about the Bf-python mailing list