[PyQt] Python modules shouldn't link directly to Python framework on OS X

William Kyngesburye woklist at kyngchaos.com
Fri Nov 21 19:55:05 GMT 2008


On Nov 21, 2008, at 1:06 PM, Brian Kelley wrote:

> While I agree with the sentiment “-undefined dynamic_lookup” has  
> caused me issues in the past, mainly with startup time for larger  
> libraries.
>
There used to be prebinding, so that startup would be faster.  But  
this required planning and compilation configuration that not many  
projects did, especially stuff ported from *nix.

Starting with Tiger, there is a dynamic prebinding thing that is  
supposed to make startup times faster after the first run of an app.   
I'm not sure how this affects Python.

> We generally built python extensions that are not intended to be  
> shipped individually but rather are built with our own interpreter  
> which is essentially statically linked to the system python (due to  
> vendorid issues).  This, then, can import the PyQt dlls.  Since we  
> are built with a particular version of python I think it is prudent  
> to not use the “-undefined dynamic_lookup” flag when using PyQt.
>
Your custom interpreter links statically to whichever Python you want,  
this is normal.  All extensions with dynamic_lookup that you import  
from your interpreter then WILL load Python symbols from that Python,  
there is no other information for the linker to think of loading from  
a different Python.

> Perhaps we could use dynamic lookup across our build system, but I  
> admit that it does make me nervous.  In any case I’ll test any new  
> PyQt that comes down the pike and let everyone know what happens.
>
> Brian Kelley
>
Any non-SIP Python extensions you use that are generated from  
distutils will be using dynamic_lookup already.

I have patched my SIP, and have an app (I'm really just the packager)  
in the wild for testing.  No news yet, good or bad.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

All generalizations are dangerous, even this one.





More information about the PyQt mailing list