setup.py 474 B

12345678910111213141516171819202122232425
  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. "build_exe": "./dist/",
  11. "excludes": ["*.txt"],
  12. "include_files": ["config.ini"],
  13. "optimize": 2,
  14. }
  15. }
  16. setup(
  17. name="pyapp",
  18. version="1.0",
  19. description="python app",
  20. options=options,
  21. executables=[executableApp],
  22. )