[Pythonmac-SIG] Name that Python

Bob Ippolito bob@redivi.com
Sun, 21 Jul 2002 18:46:44 -0400


You not only have to make it in there, but it has to link to the right 
place .. otool -Lv on the executable should say 
@executable_path/../PrivateFrameworks/Python.framework/Versions/2.3/Python 
.. It doesn't work just by dropping it where it needs to go, and I don't 
know of any tools to change this path in the Mach-O header post-link.

This needs to happen when you link the python executable or when you 
link the framework.. I've had better luck specifying this when building 
the framework because it doesn't always like to override when you do it 
for the executable, even though according to docs it should work.

Look in the man page for ld, specifically -dylib_file, -bundle_loader, 
-private_bundle, -dylib_install_name, -dylinker_install_name.. there are 
a few others if you're doing subframeworks, but those should cover 
anything you need.. actually if you don't need the private stuff 
-dylib_install_name may be sufficient (when building the framework) or 
-dylib_file (when building the executable -- if it works, I've had 
sketchy results w/ december dev tools.. haven't bothered to try w/ april 
tools).

-bob

On Sunday, July 21, 2002, at 04:14 PM, Just van Rossum wrote:

> Jack Jansen wrote:
>
> [BuildApplication-like functionality]
>> but packages may need a bit of extra work). The remaining
>> problem is stuffing Python.framework into the .app bundle. This
>> should be doable, if I understand the Apple documentation
>> correctly, by putting it in PrivateFrameworks or
>> SharedFrameworks or some such place, but I've never tried this.
>
> I tried this and I couldn't get it to work: the Python.framework could 
> not be
> found, no matter where I parked it inside the .app bundle. Anyone have 
> a clue?
>
> Just