[Pythonmac-SIG] Link against Python Framework

Jason Foreman jason at threeve.org
Wed Sep 9 16:25:21 CEST 2009


On Sep 9, 2009, at 9:07 AM, Kevin Walzer wrote:

>>
>> Major Python releases (such as 2.5 and 2.6) are not necessarily  
>> binary compatibel. If you are careful you can get a single binary  
>> that works with 2.5 and 2.6, but you then have to load the  
>> framework manually and also manually resolve any python API  
>> functions you are using.  The easiest way to do that is using the  
>> CFBundle APIs in CoreFoundation.
>>
>
> Does this mean that if one builds a PyObjC application using Apple's  
> tools--Xcode, linking against the system Python and PyObjC  
> frameworks--then it may break in an OS upgrade if Apple has upgraded  
> the system Python installation? I've always wondered about this.

In theory, it is possible.  But Apple takes care to maintain backwards  
compatibility.  If you poke around in /System/Library/Frameworks/ 
Python.framework/Versions, you'll see that (on Snow Leopard) they ship  
2.6, 2.5, *and* 2.3 (2.3 shipped with Tiger).  So the version of  
Python to which your app links should be available going forward.

If you want to make absolutely sure that Apple can't break you, you  
could bundle the version of Python.framework upon which you depend  
into your app.  However, that's probably not necessary unless you want  
to use a newer version of Python than the system has (say, 3.0+, or  
2.6 on Leopard).


Jason
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2417 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20090909/15ac118e/attachment.bin>


More information about the Pythonmac-SIG mailing list