[Py2exe-users] Python 2.5 and zlib.pyd missing
by Carlos Eduardo other posts by this author
Sep 19 2006 3:10PM messages near this date
Re: [Py2exe-users] Need a bit of TKinter help...
|
Re: [Py2exe-users] Python 2.5 and zlib.pyd missing
Looks like that Python 2.5 has the zlib module built in, crashing Py2exe when
"Compressed" = 1.
I changed a little(commented) the build_exe.py script and it worked perfectly
for me. Any drawbacks in the change i made?
Here follows the part I commented:
--- Line 572
if dist.zipfile is None:
os.unlink(arcname)
else:
if self.bundle_files < 3 or self.compressed:
arcbytes = open(arcname, "rb").read()
arcfile = open(arcname, "wb")
if self.bundle_files < 2: # bundle pythonxy.dll also
print "Adding %s to %s" % (python_dll, arcname)
arcfile.write("<pythondll> ")
bytes = open(os.path.join(self.bundle_dir, python_dll),
"rb").read()
arcfile.write(struct.pack("i", len(bytes)))
arcfile.write(bytes) # python dll
''' ---> Start comment so py2exe doesnt search for zlib.pyd
if self.compressed:
# prepend zlib.pyd also
print "Adding zlib%s.pyd to %s" % (is_debug_build and "_d"
or "", arcname)
arcfile.write("<zlib.pyd> ")
zlib_file = imp.find_module("zlib")
bytes = zlib_file.read()
arcfile.write(struct.pack("i", len(bytes)))
arcfile.write(bytes) # zlib.pyd
'''
arcfile.write(arcbytes)
--- Line 596
Waiting for feedback,
Carlos
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Py2exe-users mailing list
Py2exe-users@[...].net
https://lists.sourceforge.net/lists/listinfo/py2exe-users
Thread:
Carlos Eduardo
Don Quijote
Jimmy Retzlaff
Thomas Heller
|