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

William Kyngesburye woklist at kyngchaos.com
Fri Nov 21 18:31:37 GMT 2008


On Nov 21, 2008, at 11:56 AM, Brian Kelley wrote:

> In my humble opinion there should be an option for linking against  
> the framework libraries.  I don’t mind having the default be as  
> described.
>
> As the framework library is the only thing I test against, I would  
> prefer having the option to only use this library.  I have been  
> burned too many times by customers having an incorrect library in  
> their path so I have come to respect the “link to this library or  
> don’t run approach”.
>
Except that it's not the right way to link python (or any program's)  
extensions.

A better approach (I think), if you're worried, is to check that the  
version of python that you need is running before importing stuff.   
This way you can gracefully quit with a helpful message to the user.   
If you rely on the system linker not finding the library, the user  
gets a crash with a cryptic (to many) message about something not  
being found.  Or sometimes not even that (some people may turn off  
crash report messages).

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

"Those people who most want to rule people are, ipso-facto, those  
least suited to do it."

- A rule of the universe, from the HitchHiker's Guide to the Galaxy





More information about the PyQt mailing list