[Python-Dev] distutils and bdist_wininst confusion: clarification
Tue, 10 Oct 2000 15:06:05 +0200
There has been some confusion about distutils, especially the
I hope I can clarify these things with this post.
1. The current Distutils version 1.0, which is also
included in the Python 2.0 release candidate is perfectly
usable apart from one bug:
You should create windows installers (by running
'setup.py bdist_wininst' or 'setup.py bdist --formats=wininst')
ONLY with an external zip utility (info-zip would do).
Using the zipfile module results in corrupted installations
(all files are created with zero length).
Details about the cause for this can be found in the patch
I posted to SF.
2. I submitted a patch to SF
which corrects this bug.
Normally I would have checked this code in immediately,
because it is in _my_ code, and that's what my checkin rights
are for ;-).
I did not because I did not want to interfere with the release process of
python 2.0 rc 1.
3. How does bdist_wininst work?
bdist_wininst creates a self-extracting zipfile from two
components: a stub program (wininst.exe) plus a zip-file
containing the code to be distributed. Because I did not
liked wininst.exe as binary file checked in into CVS,
the actual bytes of this exe are included base64-encoded
in the bdist_wininst.py module as string. I'm not sure
whether this is a wise design or not, but that is a different
The downside of this design is that when the source to
wininst.exe changes, it must be recompiled, and bdist_wininst.py
must be regenerated. The context-diffs for bdist_wininst.py
are so very large.
4. To understand the patch, you should know the following:
Distutils is a separate toplevel module in the repository
on sourceforge. Parts of this repository are symbolically
linked somewhere into the python tree. Thus, this patch must
be applied to the distutils _module_ in the repository.
Distutils directory structure is as follows:
Relevant part of python directory structure:
The source code for wininst.exe is in CVS in the distutils/misc
The patch I posted to SF does not include the compiled
wininst.exe, neither does it include the (regenerated)
5. If nobody objects, I will check in the changes I made tomorrow, recompile
the exe, regenerate the bdist_wininst.py, and everything should be
Greg will then hopefully, when he is back, increase the distutils version
number to 1.0.1 (or whatever) and this version will then be delivered with
python 2.0 final.
Sorry for the confusion.