#20 Support for 'lite' mode for resulting executables

open
nobody
None
5
2008-09-04
2008-09-04
Alexey Borzenkov
No

This patch adds support for what I call a 'lite' mode, when the resulting executable starts to depend on default python installation, which saves up to several megabytes of the resulting executable size.

Primary reason for this is that I write lots and lots of small tools that I sometimes need to give to co-workers. Usually I use bundle_files=1 mode and everything is well except for size, it's 2-3 megabytes more than I would like it to be.

It's easy to ask co-workers to grab an installer at www.python.org and install it, but it's not easy to ask them to install all those extensions that I use, most of which I build myself, so I still need py2exe to package all third party extensions into the executable. But packaging python over and over again is a waste of space and bandwidth, in my opinion.

The attached patch adds this support, as well as fixing some quirks regarding current sys.path handling.

Feel free to comment if there's anything wrong with my implementation, though I have already tested it on my co-workers and it appears to work fine.

Discussion