McMillan installer

Bob Klimek wrote:

What other options are there? The best option seems to be py2exe but but
I read someplace that it doesn't create a standalone exe, which is what
I want. Alternatively can anyone recommend cx_Freeze?

The McMillan installer does generate a single file, but when run that
file unpacks itself into the temporary directory and runs from there.
That is fine for some people, but definitely not what I wanted since
it has many drawbacks such as security issues (what if other people
can write to the tmp directory?) as well as efficiency since if multiple
people run the program they run their own extracted copies rather than
a single shared one, not to mention the time to decompress and
extract when running the program.

The other installers (py2exe, cx_Freeze, BundleBuilder) all work in a
similar way. They find all dependencies of your code courtesy of modulefinder.
Python source is compiled into byte-code and placed in a zip file (or equivalent).
The various shared libraries (including the Python interpretter itself) and binary
modules are copied along with the zip into one directory. Finally they include
a stub loader that invokes the Python interpretter and arranges for the byte code
to be loaded from the zip(*), and runtime linking to happen against the binary
modules in the same directory. The consequent results are totally
independent of what the user may or may not have installed anywhere else
on their system.

This means you end up with a directory containing 10 or more files(&).
I then use the normal platform distribution mechanism to package
those up (for example InnoSetup on Windows, rpm on Linux, dmg on
Mac).

Here is the file I use for Dotamatic. It does both the freezing step
and the packaging step for Windows, Linux and Mac. You may also enjoy
the program itself which is built using wxPython:

http://cvs.sf.net/viewcvs.py/dotamatic/dotamatic/makedist.py?view=markup

Dotamatic home page: http://dotamatic.sourceforge.net

As to the merits of the various solutions, py2exe is the best of breed on
Windows, cx_Freeze on Linux and BundleBuilder on Mac. It is relatively
trivial to support all of them as the above source demonstrates. You
are more spoiled for choice on Windows, but there isn't much to distinguish
them unless you are doing advanced stuff such as Windows services, COM
servers etc and even then there is often little difference.

Both Thomas (py2exe) and Anthony (cx-Freeze) participate in many
forums and respond very quickly to questions and observations.

(*) The zip or equivalent file is often glued onto the stub loader so
you may not see it as a seperate file.

(&) I actually have 35 files in mine due to the number of extension modules
used and some like win32all are done as 7 seperate .pyd files. I also
have a resources subdirectory with things like my online help, various
template files, images and other data.

Roger