Python 2.6.1 @executable_path

Michael Torrie torriem at gmail.com
Sun Jan 11 19:01:36 EST 2009


googler.1.webmaster at spamgourmet.com wrote:
> yeap, okay, its just the beginning so I didn't know that the framework
> is still the dylib file.
> Well, I only want to compile python and put the framework in the
> subdirectory. Thats all.
> And the current state is, that the framework is not found because the
> path of the compiled Python
> library is hardcoded so when I move it from /Library/Frameworks/ to my
> app folder it isn't found
> when I start my app.

Okay, that last sentence finally started to make some sense.  Basically
you can fixup your executable and any libraries you need to have the
"@executable_path" part *after* the fact.  This is not about python, but
see this excellent document on bundling Qt apps which explains how this
is done:

http://doc.trolltech.com/4.3/deployment-mac.html

It will tell you every thing you need to know about making it so app
bundles can include and link against libraries and frameworks inside the
app bundle itself.  The keys are "otool" and "install_name_tool."

> 
> I found a ressource that I have to compile it with a dynamic path flag
> like LDFLAGS="-install_name, at executable_path/../Frameworks" to put it
> in the Framework of my app. maybe you know where my problem is. hm.

Yeah that sounds like one way to do it.






More information about the Python-list mailing list