我想使用cx_freeze将我的模块压缩到一个文件中以在Linux上分发。 我正在使用distutils安装脚本
from cx_Freeze import setup, Executable
mine= ["my","own","modules"]
build_exe_options = {
"packages":mine,
"includes":mine,
"excludes":["dbus","glib","gobject"],
"copy_dependent_files":True,
"append_script_to_exe":True,
"create_shared_zip":False,
}
base = "ConsoleKeepPath"
setup( name = "project-eri",
version = "0.1",
description = "project-eri",
options = {"build_exe": build_exe_options},
executables = [
Executable("project-eri.py", initScript=base, base=base, appendScriptToExe=True)
]
)
它工作正常,但它从/usr/lib/python2.7
和网站site-packages
复制模块。
每次更新站点库时,我都不想重建并向用户发送二进制文件。
我想通过系统更新来更新它。而且我不想写很长的“排除”。