[Python-Dev] Building a Windows MSI for Python /trunk

"Martin v. Löwis" martin at v.loewis.de
Thu Nov 26 09:54:35 CET 2009


> First, the script that finds & builds the external dependencies has two
> minor problems.
> 
>  * it puts Tcl in tcl-8.*, and Tk in tk-8.*, but msi.py looks for them in
>    tcl8.* and tk8.* to grab the license text.  I changed the glob strings
>    appropriately and that seemed to work.

Not sure what "it" is that put it there; perhaps you are referring to
the Tools/buildbot scripts?

Unfortunately, the naming convention that these scripts establish
doesn't quite work, as Tix would fail to build under these conventions.
So in my own checkout, I manually renamed the trees, and that's what
msi.py refers to.

>  * Tix isn't downloaded/installed/built automatically like everything else,
>    and msi.py looks for its license file, too.  I just removed the
>    Tix reference.  I can't figure out how to build Tix appropriately; any
>    tips?

See above. I keep forgetting how to build Tix; one set of command lines
is in PCbuild/build_tkinter.py.

> Second, the buildmsi.bat file refers to python26a3.hhp instead of
> python27a0.hhp.

Yes, that script hasn't been updated for a long time, ever since we
stopped having automated builds.

Ideally, the script would find the Python version on its own.

> Third, I could not get _tkinter to build properly, although it wasn't fatal
> to the endeavor.  It couldn't find ..\..\tcltk\lib\tcl85.lib, although
> tcl85g.lib existed.

You'll need to build release versions of Tcl/Tk/Tix.

> Oh, and there were a bunch of missing commands that (as a non-Windows xpert) I
> had to figure out with google -- things like nasm/nasmw, for example.  Are
> these documented somewhere, or would it be helpful to document them?

See PCbuild/readme.txt.

> Errm, and the 'buildmsi.bat' file has 'build' misspelled as 'buold' ;)

Thanks, fixed.

> I'd love to get this build process working completely automatically and
> 100% correctly, too.
> 
> Hat tip to Trent Nelson, who helped me figure out where the scripts are
> and what other things I needed...

Feel free to submit patches. There may be a misunderstanding, though, in
that buildmsi.bat isn't actually used for anything, and isn't "meant" to
be run by users, but instead by build slaves.

One consequence is that these scripts build in debug mode (perhaps
except for buildmsi), whereas end users would typically want to build in
release mode.

Another consequence is that different committers actually use different
procedures. Trent created much of the Tools/buildbot setup, so he is
obviously in favor of that strategy. Christian Heimes created
PCbuild/build_tkinter, so he would probably prefer to use that instead.
When I took over Windows builds from Tim Peters, PCbuild/readme.txt
was the official reference, and I try to stick to that.

Regards,
Martin


More information about the Python-Dev mailing list