Emperor_Shun_Reading/python/setup.py

24 lines
429 B
Python
Raw Permalink Normal View History

2024-08-22 01:03:01 +00:00
from cx_Freeze import setup, Executable
# 创建可执行文件的配置
executableApp = Executable(
script="main.py",
target_name="pyapp",
)
# 打包的参数配置
options = {
"build_exe": {
"build_exe":"./dist/",
"excludes": ["*.txt"],
"optimize": 2,
}
}
setup(
name="pyapp",
version="1.0",
description="python app",
options=options,
executables=[executableApp]
)