| 12345678910111213141516171819202122232425 |
- from cx_Freeze import setup, Executable
- # 创建可执行文件的配置
- executableApp = Executable(
- script="index.py",
- target_name="pyapp",
- )
- # 打包的参数配置
- options = {
- "build_exe": {
- "build_exe": "./dist/",
- "excludes": ["*.txt"],
- "include_files": ["config.ini","action.json"],
- "optimize": 2,
- }
- }
- setup(
- name="pyapp",
- version="1.0",
- description="python app",
- options=options,
- executables=[executableApp],
- )
|