[Pythonmac-SIG] sanity checks: building MacOS X app

Jason Petrone jpetrone@cnri.reston.va.us
Tue, 4 Mar 2003 17:33:23 -0500


On Tue, Mar 04, 2003 at 04:50:56PM -0500, John Speno wrote:
> On Tue, Feb 25, 2003 at 05:22:12PM -0500, Jason Petrone wrote:
> > On Tue, Feb 25, 2003 at 10:50:34PM +0100, Just van Rossum wrote:
> > > Jack Jansen wrote:
> > > > Yes, you should be able to get this to work, but you will have to
> > > > build the Python.framework yourself. I've been looking at creating
> > > > the framework in such a way that it would allow just copying 
> > > > /Library/Frameworks/Python.framework
> > > > into a private frameworks directory, but I haven't gotten it to work.
> > > > (Or, in other words: if you *did* get this to work I would be very
> > > > interested).
> 
> I think it is working already. See below.
> 
> Or maybe you mean something different?
 
At any rate, it would be nice to see this go in bundlebuilder.  

I spent WAY too much time figuring out that little bit and it would be
some consolation if I could save other people the trouble.

If this approach isn't flawed, I'm happy to send diffs.

Jason


> > > > If you could write a howto document for doing this that would be very
> > > > helpful, I'd love to put such information on the MacPython website.
> > > 
> > > My request would be simpler: write it down in simple steps so I can
> > > automate it in bundlebuilder.py ;-)
> > 
> > I've been distributing a package from a framework build.  I might be
> > doing something silly, but it works.  I'm also using wxWindows, not
> > Tkinter.
> > 
> > Basically, I just use bundlebuilder.py, but with three minor changes:
> > 
> > 0) Under MyApp.app/Contents/MacOS I create a directory 'lib' and copy
> >    any libraries needed(in my case, /usr/local/lib/libwx_mac-2.4*)
> > 
> > 1) Under that new lib dir I also create a subdirectory
> >    /Python.framework/Versions/2.3 and copy
> >    /Library/Frameworks/Python.framework/Versions/2.3/Python to it.
> > 
> > 2) I add the following lines to the start script generated by bundlebuilder:
> >     DYLD_LIBRARY_PATH=${execdir}/lib
> >     export DYLD_LIBRARY_PATH
> >     DYLD_FRAMEWORK_PATH=${execdir}/lib
> >     export DYLD_FRAMEWORK_PATH
> 
> Since I started this thread, I had time to play around with this.
> 
> It seems to be working just fine. I put the Python, Tcl and Tk frameworks
> in my app's Frameworks directory and set the DYLD*PATHs to match. I copied
> it to another machine and it launched normally. That was nice.