wxpython+matplotlib+numpy = huge app bundle?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

wxpython+matplotlib+numpy = huge app bundle?

guano
Hello all,

I'm working on a app for Structural Geology called OpenStereo
(http://www.igc.usp.br/index.php?id=openstereo). It uses wxpython,
matplotlib and numpy. I used py2exe to create a windows binary of
about 15 Mb. Using py2app, the resulting .app is over 200 Mb!!

It seems to me that the issue here is that py2app bundles wx,
matplotlib and scipy entirely. In my py2exe setup.py script I have
this:


includes = ['wx', 'os', 'sys', 'csv', 're', 'floatspin',
'scrolledpanel', 'customtreectrl',
            'wx.lib.expando', 'wx.lib.pubsub', 'wx.lib.embeddedimage',
'wx.lib.wordwrap', 'types',
            'matplotlib', 'matplotlib.pyplot', 'matplotlib.axes',
'matplotlib.figure',
            'matplotlib.backends.backend_wxagg',
'mpl_toolkits.axes_grid.axislines', 'mpl_toolkits.axes_grid',
            'matplotlib.patches', 'matplotlib.lines',
'matplotlib.text', 'matplotlib.mlab', 'matplotlib.nxutils',
            'matplotlib.collections', 'matplotlib.font_manager',
'numpy', 'numpy.ma', 'numpy.linalg', 'math'
            ]

#, 'scipy.interpolate'
excludes = ['_gtkagg', '_tkagg', 'bsddb', 'curses', 'pywin.debugger',
            'pywin.debugger.dbgcon', 'pywin.dialogs', 'tcl',
            'Tkconstants', 'Tkinter', 'pydoc', 'doctest', 'test', 'sqlite3',
            'bsddb', 'curses', 'email','_fltkagg', '_gtk', '_gtkcairo',
            '_agg2', '_cairo', '_cocoaagg',
'matplotlib.backends.backend_qt4agg','matplotlib.backends.backend_qt4',
            'PyQt4', 'PyQt4.QtGui', 'PyQt4.QtCore'
            ]

packages = ['encodings','pytz']#,'scipy']

dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll',
'tcl84.dll', 'tk84.dll',
                'libgdk_pixbuf-2.0-0.dll', 'libgtk-win32-2.0-0.dll',
'libglib-2.0-0.dll',
                'libcairo-2.dll', 'libpango-1.0-0.dll',
'libpangowin32-1.0-0.dll', 'libpangocairo-1.0-0.dll',
                'libglade-2.0-0.dll', 'libgmodule-2.0-0.dll',
'libgthread-2.0-0.dll', 'QtGui4.dll', 'QtCore.dll',
                'QtCore4.dll'
                ]


but using similar constructions in py2app doesn't seem to have any effect:


OPTIONS = {'argv_emulation': True,

           'packages': ['encodings','pytz', 'wx'],

            'includes': ['os', 'sys', 'csv', 're', 'floatspin',
'scrolledpanel', 'customtreectrl','wx.lib.expando', 'wx.lib.pubsub',
'wx.lib.embeddedimage', 'wx.lib.wordwrap', 'types','matplotlib',
'matplotlib.pyplot', 'matplotlib.axes',
'matplotlib.figure','matplotlib.backends.backend_wxagg',
'mpl_toolkits.axes_grid.axislines', 'mpl_toolkits.axes_grid',
'matplotlib.patches', 'matplotlib.lines', 'matplotlib.text',
'matplotlib.mlab', 'matplotlib.nxutils','matplotlib.collections',
'matplotlib.font_manager', 'numpy', 'numpy.ma', 'numpy.linalg',
'math'],

             'excludes': ['_gtkagg', '_tkagg', 'bsddb', 'curses',
'pywin.debugger','pywin.debugger.dbgcon', 'pywin.dialogs',
'tcl','Tkconstants', 'Tkinter', 'pydoc', 'doctest', 'test',
'sqlite3','bsddb', 'curses', 'email','_fltkagg', '_gtk',
'_gtkcairo','_agg2', '_cairo', '_cocoaagg',
'matplotlib.backends.backend_qt4agg','matplotlib.backends.backend_qt4','PyQt4',
'PyQt4.QtGui', 'PyQt4.QtCore'],

           'resources': ['icons/openstereo_icon_noname_256x256x32.png'],

           'iconfile' : 'icons/openstereo_icon_noname.icns',
           }



Any thought on this are very appreciated.

best

Carlos





--
Prof. Carlos Henrique Grohmann - Geologist D.Sc.
Institute of Geosciences - Univ. of São Paulo, Brazil
---
http://www.igc.usp.br/pessoais/guano
http://digitalelevation.wordpress.com/
http://lattes.cnpq.br/5846052449613692 (CV)
---
Twitter: @CarlosGrohmann
http://carlosgrohmann.tumblr.com/
Linux User #89721
________________
Can’t stop the signal.
_______________________________________________
Pythonmac-SIG maillist  -  [hidden email]
http://mail.python.org/mailman/listinfo/pythonmac-sig
unsubscribe: http://mail.python.org/mailman/options/Pythonmac-SIG