build.spec 918 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # -*- mode: python ; coding: utf-8 -*-
  2. block_cipher = None
  3. a = Analysis(
  4. ['app.py'],
  5. pathex=[],
  6. binaries=[],
  7. datas=[
  8. ('templates', 'templates'),
  9. ('static', 'static'),
  10. ('instance', 'instance'),
  11. ('static/favicon.ico', 'static') # 新增:确保网站图标被打包
  12. ],
  13. hiddenimports=['flask_sqlalchemy', 'flask_login'],
  14. hookspath=[],
  15. runtime_hooks=[],
  16. excludes=[],
  17. win_no_prefer_redirects=False,
  18. win_private_assemblies=False,
  19. cipher=block_cipher,
  20. )
  21. pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
  22. exe = EXE(
  23. pyz,
  24. a.scripts,
  25. [],
  26. exclude_binaries=True,
  27. name='ContractManager',
  28. debug=False,
  29. bootloader_ignore_signals=False,
  30. strip=False,
  31. upx=True,
  32. console=True
  33. )
  34. coll = COLLECT(
  35. exe,
  36. a.binaries,
  37. a.zipfiles,
  38. a.datas,
  39. strip=False,
  40. upx=True,
  41. name='ContractManager'
  42. )