Where are we with simultaneous Python Framework installs
Ronald Oussoren
ronaldoussoren at mac.com
Fri May 9 07:02:09 PDT 2008
On Friday, May 09, 2008, at 03:45PM, "Rainer Müller" <raimue at macports.org> wrote:
>Anders F Björklund wrote:
>> gcc test.c -F/opt/local/Library/Frameworks -framework Python
>
>Ah, my bad. I added the path to Python.framework instead of the parent.
>Must have misread the documentation.
>
>So, if there is no solution to choose a specific version we really need
>to add locking...
I haven't followed the discussion at all, so please forgive my ignorance on that part.
First of: what are you trying to accomplish? And more to the point: I'd like to know if there's anything we can change in the python.org distribution to make that easier to accomplish.
Python's distutils will automaticly link to the right python framework (or rather, doesn't explicitly link to the framework at all). For other unix-style builds you can add '-L ${sys.prefix}/lib/pythonX.Y/config/ -lpythonX.Y' to the link flags, which will link to the framework on recent enough builds of python (AFAIK all 2.5 builds, but definitly 2.5.2 and later). If you're using python2.5 or later: have a look at the "python-config" command.
Apple's GCC doesn't have an option to explicitly pick a specific framework version, although you can always link the dylib inside the framework:
gcc -o foo .... /Library/Frameworks/Python.framework/2.5/Python
instead of:
gcc -o foo .... -framework Python
Ronald
More information about the macports-dev
mailing list