On 9 Mar, 2012, at 16:33, Ronald Oussoren wrote:

> 
> On 9 Mar, 2012, at 10:55, Carlos Grohmann wrote:
> 
>> I think that if the 'excludes' weren't overwritten by the
>> wx/numpy/matplotlib/etc recipes, it would be easier to fine-tune our
>> options (maybe run the recipes first and aftrer run the excludes?)
> 
> The matplotlib issue seems to be a bug that's not related to recipes: py2app 
> copies package data into the application bundle, and this code accidently 
> also copied all subpackages like the matplotlib.test package.   I have a 
> patch, but need to test if this actually fixes the bug before I commit.

It didn't, but I did make some progress:

1) I added a py2app recipe that does the right thing with the pubsub library in 
wxPython. That library uses __path__ hacks and that confuses modulegraph (and 
hence py2app). Because of this you no longer have to explicitly include 'wx' in 
the application bundle

2) I tweaked the matplotlib recipe in py2app, it no longer copies the entire 
package but adds a hook to tell matplotlib where its data is. This solution is 
not fully complete yet, I'm currently including mpl-data twice (once in 
Resources, once in site-packages.zip) and the later copy is not needed.

With this the application bundle already shrinks a little (curently 123 MByte, 
before I started it was about 160 MByte). About 70 Mbyte of this is wx itself 
(the wxWidgets library and wxPython extensions). Another 21 MByte is because 
all of numpy is included, not just the bits that are actually needed. That's 
because of another py2app recipe which can hopefully be improved. 

I just pushed updates to modulegraph and py2app to my bitbucket repositories.

Ronald

> 
> Ronald
> 
> _______________________________________________
> Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
> http://mail.python.org/mailman/listinfo/pythonmac-sig
> unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIG@python.org
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG

Reply via email to