[Pythonmac-SIG] help about python frameworks in blender

Jean-Luc Peurière jlp at nerim.net
Mon Aug 15 17:06:01 CEST 2005


Hello,

I'm the Os X platform manager for blender (3D app, see  
www.blender.org), and we are facing some problems about embedding last  
version of python in it.

Until now, we were using python 2.3 which meant that we statically  
linked the Os X 10.2 build with a fink installed python, and used the  
apple framework for 10.3 and later.

Blender need to link against a core python for its internal use, and if  
an installed python is present, for non-core modules used by scripts.

Now, our python team wants to switch to python 2.4.1 for blender 2.40  
(nice versions match ;) which puts the Os X version a bit in jeopardy :

- compiling with the "unofficial official" version works of course, but  
that means that users must have the same lib installed, or there is  
crash at launch as the lib resides in a different place than the apple  
one. Although installing the lib is not hard, we are not pleased to  
introduce a dependancy.
- weak linking the framework leads to errors as non weak references are  
presents (which is normal) in our core python API
- i did not manage yet to compile a static version out of the framework  
(which is straightforward with a fink installed python), and dont want  
to force coders to install by fink (or darwinports).
- The 10.2 build will stay with its static 2.3 lib, so is out of  
questioning
- Those building against CVS wont have problems as we can automate  
choice of the correct lib, but we are in trouble for releases

So my questions are :

- Do we have a way of linking against the 2.4 framework that allow a  
fallback against the apple provided 2.3 lib ?

- If that dont work, how static compiling out of the framework, or  
include the framework in the app bundle ?

Blender is build with 3 systems : makefiles, scons or xcode

scons build settings for framework :

PYTHON_INCLUDE =  
['/Library/Frameworks/Python.framework/Versions/2.4/include/python2.4']
PYTHON_LIBPATH =  
['/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/ 
config']
PYTHON_LIBRARY = []
PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'python' ]


Please keep the CC, I'm not suscribed to this mlist, even if i will try  
to monitor this subject via archives

-- 
Lukep
Blender Os X platform manager



More information about the Pythonmac-SIG mailing list