setup.py 716 B

12345678910111213141516171819202122232425262728293031323334
  1. from cx_Freeze import setup, Executable
  2. # 创建可执行文件的配置
  3. executableApp = Executable(
  4. script="index.py",
  5. target_name="pyapp",
  6. )
  7. # 打包的参数配置
  8. options = {
  9. "build_exe": {
  10. "packages": ["custom_plugins"],
  11. "build_exe": "./dist/",
  12. "excludes": ["*.txt"],
  13. "include_files": [
  14. "config.ini",
  15. "action.json",
  16. "action_tabs.json",
  17. "sys_configs.json",
  18. "command.txt"
  19. # "database.db",
  20. # "custom_plugins/",
  21. ],
  22. "optimize": 2,
  23. }
  24. }
  25. setup(
  26. name="pyapp",
  27. version="1.0",
  28. description="python app",
  29. options=options,
  30. executables=[executableApp],
  31. )