[Distutils] easy_install doesn't recognize valid distutils Windows installers
Matt Good
matt at matt-good.net
Tue Sep 19 20:59:11 CEST 2006
On Windows "easy_install trac" fails with the error:
"trac-0.10b1.win32.exe is not a valid distutils Windows .exe"
http://trac.edgewall.org/ticket/3750
The problem is with easy_install locating the config information
embedded in the file. The following patch works with the Trac
installer, but I don't know if it will break support for other
installers:
Index: setuptools/command/easy_install.py
===================================================================
--- setuptools/command/easy_install.py (revision 51920)
+++ setuptools/command/easy_install.py (working copy)
@@ -1249,7 +1249,7 @@
if tag not in (0x1234567A, 0x1234567B):
return None # not a valid tag
- f.seek(prepended-(12+cfglen+bmlen))
+ f.seek(prepended-(12+cfglen))
cfg =
ConfigParser.RawConfigParser({'version':'','target_version':''})
try:
cfg.readfp(StringIO.StringIO(f.read(cfglen).split(chr(0),1)[0]))
--
Matt Good <matt at matt-good.net>
More information about the Distutils-SIG
mailing list