[PyQt] Python modules shouldn't link directly to Python framework
on OS X
Phil Thompson
phil at riverbankcomputing.com
Fri Nov 21 17:03:36 GMT 2008
On Fri, 14 Nov 2008 23:33:59 -0600, William Kyngesburye
<woklist at kyngchaos.com> wrote:
> Python extensions on OS X are built as bundles, and are expected to be
> loaded dynamically by Python or another program that is linked to the
> Python framework. The extension expects to find all the Python
> symbols already loaded.
>
> SIP gets the -bundle flag right, but also links directly to the Python
> framework.
>
> The nice benefit of this is that we can compile an extension with one
> build of Python (say the Leopard system Python 2.5.1), then install a
> newer (point version) Python and have the extension loadable in the
> newer Python. Or distribute the extension where others might have
> installed a newer version of Python.
>
> This will take care of not-linking the python framework - in
> siputils.py, ModuleMakefile().finalise(), change:
>
> self.LFLAGS.append("-F%s" % string.join(dl, os.sep))
> self.LFLAGS.append("-framework Python")
>
> to:
>
> self.LFLAGS.append("-undefined dynamic_lookup")
Thanks - it will be in SIP v4.8.
Phil
More information about the PyQt
mailing list