[Distutils] Installer

Gordon McMillan gmcm@hypernet.com
Sat, 20 Feb 1999 15:02:43 -0500


Hi all,

I've taken Greg Stein's "small" distribution and (with his advice(*) 
and help) created a mechanism for building compressed single-file 
importable python libraries. This is cross-platform, depending only 
on zlib (and Greg's imputil.py). There are a number of ways you can 
create these archives - grabbing directories, packages or computing 
the dependencies of a particular script.

Then, for Win32 users, I've taken it a few steps further. I've mixed 
this with Christian Tismer's sqfreeze (based on /F's squeeze) and 
freeze and created a compiler-less Python installer. You can also use 
it much like freeze, except you don't need a compiler. The major 
difference is that, once installed, it won't be a completely 
standalone executable. The installer will unpack the dependencies 
into the exe's directory.  There will be no dependencies outside 
that directory(**). You can pack in extension modules, dlls and 
anything else you like. The python lib support will be contained in a 
single archive file. So the equivalent of a frozen pure-python script 
would be one self-installing exe that expands to 5 files - the 
"squeezed" main script, python15.dll, zlib.dll, zlib.pyd and your 
private support lib (something.pyz).

Check it out - http://www.mcmillan-inc.com/install.html

Oh yes, while the code has my copyright, it's released under a 
do-what-you-want license. Mostly, I glued together what others had 
done (freeze, sqfreeze, Greg's stuff...).

- Gordon

(*) Not always followed. Don't blame Greg.

(**) Note that if you want to install something that makes use of 
Mark's COM extensions (particularly, Python COM servers), you can't 
get away with this.