artemp/mapnik — Issue #453: More flexible dynamic linking for python module on OS X
Author: artemp
Created: 2011-10-11 16:19:46+00:00
State: open
Labels: Mac_OS_X_Binaries

Currently both boost_python and the mapnik python module directly link to the Python Framework/dylib, which can be restrictive. A python module is loaded by Python, thus all of the necessary Python symbols are loaded. Linking Python directly may not be standard for OS X, and instead other modules use (pycairo for example) the flag to ld of 'undefined dynamic_lookup'. Thus when any major.minor version of Python should work with a mapnik module compiled against that major version by loading in any other binary of the same major.minor version (though there could be be some differences in the Python build that could cause trouble).

This could allow mapnik's python module to be used with either the /System (apple installed) or /Library (python.org installed) python versions as long as the major.minor version matches. And this would potentially avoid the all to common:

{{{
'Fatal Python error: Interpreter not initialized (version mismatch?)'
Abort trap
}}}