[Pythonmac-SIG] Don't bundle everything in a framework

Cezary Krzyżanowski dhubleizh at o2.pl
Thu Aug 20 01:32:58 CEST 2009


Hi!

I've been using py2app quite some time now and I've been lovin' it.

But the thing is, that my final bundles get *very* large, I mean a Qt  
gui application could reach up to 100MB (before the ugly dSYM  
deleting, but it still gets to 60MB afterwards) and wxWidgets  
application up to 40-50MB. Is there a way to bundle only some modules  
from those huge frameworks? I mean both Qt and Wx can be built as many  
dynamic libraries composing the whole framework. In a C++ application  
I'd link and then distribute only those modules I use.

That's not the case in py2app, where absolutely everything from a  
framework gets bundled, even when properly built modular Qt and Wx.  
The only solution to this I've found is to build python bindings for  
only selected modules and use that custom built when packaging. That's  
a bit annoying and I've got that working only with Qt --- wx doesn't  
have explicit --disable-module-x or --disable-library-x config switch,  
and going through 5 pages of --disable/enable features and their deps  
is a hell.

The size is a problem for me, cause I've wrote a status icon for a  
wiki, that is supposed to be small, tidy and minimal, but I get a dmg  
of 25MB (Qt case).

I've tried all the --exclude and --exclude-dynlib, or using __import__  
or using from wx import something_more_special or deleting and  
manually adding, but I can't get that working.

Czarek


More information about the Pythonmac-SIG mailing list