setup.py 690 B

123456789101112131415161718192021222324252627282930313233
  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. # "database.db",
  19. # "custom_plugins/",
  20. ],
  21. "optimize": 2,
  22. }
  23. }
  24. setup(
  25. name="pyapp",
  26. version="1.0",
  27. description="python app",
  28. options=options,
  29. executables=[executableApp],
  30. )