from cx_Freeze import setup, Executable
new_version = get_new_version() # 每次打包生成一个版本号
# Replace "your_script.py" with the name of your Python script
exe = Executable(script="main.py", base=None)
# Specify the target platform as Linux
options = {
'build_exe': {
'packages': ['can'], # 依赖包缺失
'include_files': [ # 其他文件需要打包到项目中
'config.ini',
'logo.png' # 应用logo
]
}
}
setup(
name="appliaction name",
options=options,
version=new_version,
description="application description",
executables=[exe]
)
cx_Freeze 打包python应用程序为可执行程序
于 2024-01-02 17:24:44 首次发布