[Pythonmac-SIG] Link against Python Framework

Ronald Oussoren ronaldoussoren at mac.com
Mon Sep 14 19:27:39 CEST 2009


On 10 Sep, 2009, at 12:09, Georg Seifert wrote:

>>
>> 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).
>
> How do I specify the version to link with.
> The 10.5 SDK links against python 2.5 and the 10.6 SDK to 2.6. But  
> what if I need the 10.6 SKD but want to link to python 2.5?

Don't compile and link using the "-framework" flag, but use the  
'python-config' command to get the right compiler flags for linking  
and compiling. The python-config command is located inside the  
framework (such as  /System/Library/Frameworks/Python.framework/ 
Versions/2.5/bin/python-config).

If you are using Xcode you can hardcode the output of this command  
into your Xcode project, you don't have to run python-config every  
time you compile.

Ronald
>
> Regards
> Georg
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG at python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig



More information about the Pythonmac-SIG mailing list