[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Optimizing py2exe for pygame



Python itself will load many modules at startup, besides what your game uses. Things like "warnings" are needed to run, and that in turn requires "re" and a pile of others.

The bundled Python should only be about 1-2 MB once compressed. How big is your game if you just zip it? I'm guessing about 5 MB. The py2exe installer for Solarwolf is only 3 MB, and that is 90% game.

Chris wrote:
py2exe is overkill on the standard instructions.

As far as python is concerned, I know which modules I need because I imported them--pygame, random and os. The output, however, seems to give me every module on my python 2.5.2 setup.

Has anyone on this list written a py2exe setup script to get something more... sensible? My 7MB binary dist directory works* but 7 megabytes is far and away too big for my game.

Would I use include to compile only the modules I need or do I need to makes a lengthy exclude list?