setup.py 656 B

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