There are informations on how to build a bpy python module from blender source but, it does not work (for me) using Ubuntu x64 16.04LTS.
We need a working guidance !?
Building it up with: https://wiki.blender.org/index.php/Dev:Doc/Building_Blender/Linux/Ubuntu/CMake
...and at the end:
or: different cmake config: https://wiki.blender.org/index.php/User:Ideasman42/BlenderAsPyModule
- building blender bin is fine out of the box.
but make configs and also "make bpy" throws errors:
requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
some solution for this is to:
build up python on your own with "enable-shared" and copy over libpython3.6m.a
sudo apt install build-essential checkinstall
sudo apt install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
tar xvf Python-3.6.0.tar.xz
sudo make altinstall
and copy over libpython3.6m.a from /usr/local/lib/python3.6/config-3.6m-x86_64-linux-gnu/libpython3.6m.a to /opt/lib/python-3.6/lib
BUT the main problem is
which should behave the way to build python with fPIC right away !
Answered from blendercoders chat: There is a pending fix for it: https://developer.blender.org/D3078 But not in master today.
Question: Is it the purpose not to include folder "2.79" on "make bpy" so there are files missing -- compared to the ^^Ideasman42 config, is there a pending fix or is that "working as designed" - could it be made better!?