Py2exe Question - Deployment Advice

Roger Binns rogerb at rogerbinns.com
Sat Aug 14 02:36:56 EDT 2004


Dave Guenthner wrote:
> For Perl, I used the Perl2exe product and I was simply given one file
> .exe to distribute.  Has anyone one else run into this before /
> experienced that.  Is there a way to have just one file?

I believe the McMillan installer does that.  (It actually "cheats"
and effectively unpacks itself into a temp directory every time
you run the program).

I actually just use InnoSetup to distribute my program.  That also
takes care of things like putting icons in the menus and providing
an uninstall entry in the Control Panel, as well as upgrades.

The simple technical reason why there are multiple files is because
the Python implementors put the mandatory functionality into
the main dll, and have the seperate ones for optional functionality
such as regular expressions, sockets, CSV, XML etc.

Under the hood py2exe uses modulefinder.  modulefinder finds every
module your program could potentially use.  For example, if you
use URLs and the url library, that library references the SSL
library.  modulefinder will include both, even though you may
never use an SSL based url.

If you know for certain that you don't use certain functionality,
then feel free to tell py2exe/modulefinder that you don't want
particular modules.  However you need to be very certain :-)

Roger 





More information about the Python-list mailing list