当前位置:首页 » 其他

py2exe setup.py

2009-06-16 12:24 本站整理 浏览(7)
from distutils.core import setup
import py2exe
includes = ["encodings", "encodings.*"]
options = {"py2exe":
{ "compressed": 1,
"optimize": 2,
"includes": includes,
}
}
setup(
version = "0.1.0",
description = "search panda",
name = "search panda",
options = options,
windows=[{"script": "search.py", "icon_resources": [(1, "search.ico")] }],
)
只需要改为:
from distutils.core import setup
import py2exe
includes = ["encodings", "encodings.*"]
options = {"py2exe":
{ "compressed": 1,
"optimize": 2,
"includes": includes,
"bundle_files": 1
}
}
setup(
version = "0.1.0",
description = "search panda",
name = "search panda",
options = options,
zipfile=None,
windows=[{"script": "search.py", "icon_resources": [(1, "search.ico")] }],
)
出自http://jinheking.javaeye.com/blog/165057