[Pythonmac-SIG] Creating an applet that includes wxPython

Bob Ippolito bob at redivi.com
Sun Sep 7 17:20:22 EDT 2003

On Sunday, Sep 7, 2003, at 15:50 America/New_York, Jack Jansen wrote:

> In stead of modifying the references to the wx libraries, as Bob
> suggested, I think it should be possible to setup DYLD_LIBRARY_PATH
> in the bundle bootstrap script, and simply copy the libraries into
> the bundle somewhere (I think I would put them in Frameworks in stead
> of in Resources, but that's a minor detail).

I would put them in Frameworks too, myself, but I haven't used 
bundlebuilder enough to know that it knows how to put stuff other than 
the Python framework there.

> Hmm, looking at the source for the bootstrap script I see it already
> sets both DYLD_LIBRARY_PATH and DYLD_FRAMEWORK_PATH to point to the
> Frameworks directory! And there's a --lib option that puts things in
> there!

Cool :)

I like to modify the references so it's more deterministic.. AFAIK dyld 
will always try the mach-o header references first, then start poking 
around at the search paths.  In my suggested case, it will link to the 
included binaries regardless of what the user has installed.

There is definitely a case for using potool to allow bundlebuilder to 
find these libraries for you (i.e. check references that don't live in 
/System or /usr/lib and move those frameworks and libraries into the 

I also think that since some modules reference the same dynamic 
libraries, it might make sense to have an option to do even more 
relocation (in the case where they use different versions or 
something).. for example you could put things in 
@executable_path/../Frameworks/%s/ where %s is the name of the python 
package that depends on that dylib or framework.  I don't know of any 
real cases where a conflict of this nature happens, so it might be 


More information about the Pythonmac-SIG mailing list