Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#17 patch to fix zlib not imported error

closed-accepted
nobody
None
5
2008-04-05
2007-04-26
Alexey Borzenkov
No

When you specify compressed=1, bundle_files=3 (it's the default) and zipfile is None, your compiled exe can't start, because it didn't import zlib.pyd. This patch will allow these options combination. How to reproduce:

# setup.py
from distutils.core import setup
import os
import sys
import py2exe

if len(sys.argv) == 1:
sys.argv.append("py2exe")
sys.argv.append("-q")

options = {
"py2exe" : {
"optimize": 2,
"compressed": 1,
"bundle_files": 3,
},
}

setup(
zipfile=None,
options=options,
console=["test.py"],
)

# test.py
print "Hello world!"

The patch I'm attaching here is actually against my version of path 1516099 already applied, but I think it would apply against vanilla as well (with hunk shift).

Discussion

  • patch to fix compressed=1 with zipfile=None bug

     
  • Jimmy Retzlaff
    Jimmy Retzlaff
    2008-04-05

    • status: open --> closed-accepted