using Python distutils bdist_msi to create installer for large complicated package

Bill Janssen janssen at
Sun Mar 21 23:50:13 CET 2010


I've been re-thinking the UpLib Windows installer technology, and it
occurred to me to wonder why I can't just use the nice bdist_msi module
in Python to build my packages.  I took a look, and it seems almost
doable.  Presumably you wrote it?

UpLib is a big package, with lots of Python and Java and C programs, and
for Windows I package it with lots of other programs like those from
xpdf.  All of this is installed in C:\Program Files\UpLib\VERSION\, in
bin, lib, share, and so forth subdirectories.  If I autogenerated a file which described everything as "data_files", it should be
simple to package everything up in a Cab, and bdist_msi apparently also
provides the ability to add pre- and post-install scripts.  Everything
I need, really.

There are a couple of Python-specific options in the code: the "Product
Name" is prefixed with the python version, and in the GUI, the default
location is the location of a Python distro.  If the package had a
"--non-python" option which would defeat these, and perhaps also set
"no-target-optimize" and "no-target-compile" to True, it would be a
simple but pretty general-purpose packager module.

I'll subclass it and play around a bit.


More information about the Python-list mailing list