[PyQt] py2app generates huge files (200MB)

Michael Held michael.held at bc.biol.ethz.ch
Sat Jun 27 00:35:13 BST 2009


hi pyqt,

I am using PyQt4.5 and py2app 0.3.6 on MacOS 10.5

> from setuptools import setup
> 
> APP = ['MyApp.py']
> DATA_FILES = []
> OPTIONS = {'argv_emulation': True,
>            'includes': [],
>            } 
> 
> setup(
>     app=APP,
>     data_files=DATA_FILES,
>     options={'py2app': OPTIONS},
>     setup_requires=['py2app'],
> )

running this setup.py PyQt4, sip and the Qt framework are detected and
the app runs fine,

*BUT* the app is 200MB (TWOHUNDRET MEGABYTES) big and its doing nothing
but opening an empty QFrame.
I looked into the app-contents and found a lot of debug stuff for the
QtGui/QtCore Frameworks.

after deleting these files the app was still running fine and only 42MB
big (I found a lot of Pyhton libs/packages in there which are not used
at all)

42MB for an "empty program" is ok, since all my scripts will not add
much size, but 200MB is just *too big*.
it looks like py2app is including a lot of unnecessary stuff...
could stackless Python 2.6.2 is the problem?

thanks a lot for your help!
michael



More information about the PyQt mailing list