I recently added Python scripting to our app (an open source, cross-platform
Life app called Golly; see http://golly.sourceforge.net/ if you're interested).

Based on what I read at http://pythonmac.org/wiki/FAQ (excellent resource BTW),
our makefile uses these variables when compiling and linking:

PYTHON_INCLUDE = -I`python -c "import distutils.sysconfig; print 
distutils.sysconfig.get_python_inc()"`
PYTHON_LINK = `python -c "import distutils.sysconfig; print 
distutils.sysconfig.get_config_var('LINKFORSHARED')"`

This works fine on OS 10.3.9, but on an Intel Mac running OS 10.4.5 the link
step fails because PYTHON_LINK is set to this:

-u __dummy -u _PyMac_Error -framework System 
Python.framework/Versions/2.3/Python -framework CoreServices -framework 
Foundation

Does anybody know why it contains "Python.framework/Versions/2.3/Python" rather
than "-framework Python"?

I can fix the problem by explicitly using

PYTHON_LINK = -u __dummy -u _PyMac_Error -framework System -framework Python 
-framework CoreServices -framework Foundation

but presumably that's not a good long-term solution.

This is my first project using gcc, makefiles, frameworks, Python, etc,
so I'm still somewhat foggy about lots of things.  Any advice would be
much appreciated!

Andrew
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Reply via email to