#648 'setup.py bdist_msi' fails for version 217

v1.0 (example)
William Sadkin

Because I couldn't build version 218 on my machine (see ticket #647), I went back to the previous version (217), which at least built. However, on trying to create the distribution, it complains:

copying com\win32com\src\include\PythonCOMServer.h -> build\bdist.win32\msi\Lib\site-packages\win32com\include
copying com\License.txt -> build\bdist.win32\msi\Lib\site-packages\win32com
copying com\pythoncom.py -> build\bdist.win32\msi\Lib\site-packages\ copying pywin32.pth -> build\bdist.win32\msi\Lib\site-packages\ running install_egg_info
Writing build\bdist.win32\msi\Lib\site-packages\pywin32-217-py2.7.egg-info
Executing post install script...
creating dist
Traceback (most recent call last):
File "setup.py", line 2435, in <module>
('', ('pywin32.pth',)),
File "c:\Python27\lib\distutils\core.py", line 152, in setup
File "c:\Python27\lib\distutils\dist.py", line 953, in run_commands
File "c:\Python27\lib\distutils\dist.py", line 972, in run_command
File "c:\Python27\lib\distutils\command\bdist_msi.py", line 232, in run
sversion = "%d.%d.%d" % StrictVersion(version).version
File "c:\Python27\lib\distutils\version.py", line 40, in init
File "c:\Python27\lib\distutils\version.py", line 107, in parse
raise ValueError, "invalid version number '%s'" % vstring
ValueError: invalid version number '217'
The pywin32 extensions were successfully installed.

1) How can this not be a valid version number?!?

2) I am trying to build a .msi, and the dist directory ends up empty, which invites the question: why does the log end with "The pywin32 extensions were successfully installed." (!!)

3) Can you pleeeeeeze either generate official .msis or somehow make it possible to do a silent install via the .exes you do produce? (that way, I could dispense with trying to do this on my own.)

Thanks in advance,
/Will Sadkin
Parlance Corporation
(For the record, my command line was: 'c:\Python27\python.exe setup.py bdist_msi > build.log 2>&1')


  • William Sadkin
    William Sadkin

    For the record, I actually got an msi build to work by making the attached changes to the setup.py file, and patching my distutils with the patch supplied in the following bug report:

    I am not sure the attached patch is ultimately the one the authors would make, but it did solve the above problem; the resulting msi was named pywin32-2.7.217.win32-py2.7.msi, which is a tad redundant, but I have not tried to figure out how to modify that string to match the .exe names in the official distribution.