On Fri, Nov 14, 2008 at 7:30 PM, William Kyngesburye <[EMAIL PROTECTED]> wrote: > On Nov 14, 2008, at 11:07 AM, Martin Dobias wrote: > >> Am I right that the problem applies only to bindings (based on >> SIP/PyQt4), while implementation of embedded python (libqgispython) is >> okay? > > > Ah, there's a tricky one. Is libqgispython meant to be a "library", linked > by other plugins or the Qgis app? Or is it more like a plugin, loaded by > Qgis? > > I see that none of Qgis, libqgis_* or python/qgis/*.so directly link > libqgispython. Yet it is compiled as a library (not bundle) and also links > directly to the python binary. > > If libqgispython is dynamically loaded by Qgis, thet it should also be > compiled as a bundle and not linked to python. > > If libqgispython is meant to be used as a library by other binaries (ie > python extensions), then it still shouldn't link directly to python, but > expect Python to be loaded in some way by whatever is linking to it. It > would have to compile with -undefined dynamic_lookup then.
libqgispython is meant to be loaded dynamically by QGIS application on startup. All python-related implementation is in this library, the rest of application is "python-free", i.e. it doesn't use any functions directly from python libs. libqgispython is not meant to be used by anything else than QGIS application itself. The main reason of this implementation is that this way we can have python support (python console and python plugins) optionally, and it should make life easier for packagers. And second reason, if libqgispython is not found (or can't be loaded for some reason) when QGIS starts, nothing fatal happens, just python support is disabled. I hope this makes things a little clearer... Martin _______________________________________________ Qgis-user mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-user
