minimum python for distribution on Windows

Thomas Heller theller at python.net
Fri Mar 21 21:06:49 CET 2003


Dave Brueck <dave at pythonapocrypha.com> writes:

> On Thu, 20 Mar 2003, Bob Roberts wrote:
> 
> > Dave Brueck <dave at pythonapocrypha.com> wrote:
> > > On Wed, 19 Mar 2003, Bob Roberts wrote:
> > >
> > > > I just tried out py2exe, and it worked great.  Is it possible to
> > > > do something similar, but with my python source code still
> > > > available (and able to be modified)?
> > >
> > > IIRC py2exe has a --excludes parameter that tells it to, well,
> > > exclude the module from the distribution.
> >
> > Thank you, that worked well.  And thank you for your Python 2.1
> > Bible, while I'm at it.
> 
> That _you_ for buying it. :)
> 
> > Is it possible to do this without py2exe?  What if I have a large
> > number of scripts that use pretty much the same modules?  It would
> > be nice to be able to distribute the python.exe, the libraries, and
> > my scripts without having to have the python.exe bundled for each
> > script.
> 
> Yes, you can do this - the tradeoff is mostly that you are the one
> responsible for finding and including all the dependencies. The poor
> man's approach is to set your PATH environment variable to be empty
> and rename the directory Python is installed in and put Python.exe and
> your modules in an empty directory. Run it, see what errors
> occur. Repeat until done.

No need to do this manually, freeze's modulefinder can be used to find
needed modules. That's also what py2exe uses.

Note that Just v. Rossum has improved modulefinder quite a bit, and the
CVS version should also work with 2.2.

Thomas




More information about the Python-list mailing list