[wxPython-users] py2app ideal setup.py

Christopher Barker Chris.Barker at noaa.gov
Wed Apr 11 09:26:53 PDT 2007


Paulo Nuin wrote:
> I tried packaging my application with py2app using a "simple" setup.py, 
> but the resulting app was more than 70 Mb. What would be an ideal 
> setup.py file in order to minimize a little bit the size of the 
> resulting app?

What machine are you packaging on? A thread about this a while back 
seemed to indicate that for some reason, the .app ends up much bigger 
when built on an Intel machine than a PPC machine, even though both are 
building Universal apps. I suspect extra copies of some libs are being 
included or something.


Frank Niessink wrote:
> I use hdiutil to create a dmg file, i.e. after python setup.py py2app I do:

a dmg is a good way to distribute, but you can also use just plain zip. 
In any case, you do need to bundle it up somehow, so you might as well 
compress.

>the 47MB that MyApp.app is.

That's about the size I get too. I think 70 MB really is way too big. 
Please post to the macpython list about this.

Before doing that, you might want to put together a very simple sample 
you can post, and see what people get bundling it up on both Intel and 
PPC machines.

If ~40 MB is still too big, you may be able to remove some extra libs 
form you .app. Py2app tries to make things "just work" so it includes 
all of wxPython, etc. Py2app includes "recipes" to handle known complex 
packages like wx. You can look to see what it's doing, and you may be 
able to trim.

It's not going to get that much smaller though, between all the wx and 
wxPython libs and Intel and PPC binaries -- there's a LOT needed!

-Chris


-- 
Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

Chris.Barker at noaa.gov




More information about the wxpython-users mailing list