The pywebview app for deemix-webui
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

64 lines
2.1 KiB

  1. # -*- mode: python ; coding: utf-8 -*-
  2. import sys
  3. from datetime import date
  4. import subprocess
  5. today = date.today().strftime("%Y.%m.%d")
  6. commit = subprocess.check_output(['git', 'rev-parse', 'HEAD'])[:10].decode("utf-8")
  7. version = f"{today}-{commit}"
  8. with open('version.txt', 'w') as f:
  9. f.write(version)
  10. block_cipher = None
  11. sys.modules['FixTk'] = None
  12. a = Analysis(['server.py'],
  13. binaries=[],
  14. datas=[('webui/public', 'webui'), ('icon.ico', '.'), ('version.txt', '.')],
  15. hiddenimports=['engineio.async_drivers.threading', 'pkg_resources.py2_warn', 'eventlet.hubs.epolls', 'eventlet.hubs.kqueue', 'eventlet.hubs.selects', 'dns', 'dns.dnssec', 'dns.e164', 'dns.hash', 'dns.namedict', 'dns.tsigkeyring', 'dns.update', 'dns.version', 'dns.zone'],
  16. hookspath=[],
  17. runtime_hooks=[],
  18. excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter'],
  19. win_no_prefer_redirects=False,
  20. win_private_assemblies=False,
  21. cipher=block_cipher,
  22. noarchive=False)
  23. pyz = PYZ(a.pure, a.zipped_data,
  24. cipher=block_cipher)
  25. if '--onefile' in sys.argv or '-F' in sys.argv:
  26. exe = EXE(pyz,
  27. a.scripts,
  28. a.binaries,
  29. a.zipfiles,
  30. a.datas,
  31. [],
  32. name='deemix-server',
  33. debug=False,
  34. bootloader_ignore_signals=False,
  35. strip=False,
  36. upx=True,
  37. upx_exclude=[],
  38. runtime_tmpdir=None,
  39. console=True , icon='icon.ico')
  40. else:
  41. exe = EXE(pyz,
  42. a.scripts,
  43. [],
  44. exclude_binaries=True,
  45. name='deemix-server',
  46. debug=False,
  47. bootloader_ignore_signals=False,
  48. strip=False,
  49. upx=True,
  50. console=True,
  51. icon="icon.ico")
  52. coll = COLLECT(exe,
  53. a.binaries,
  54. a.zipfiles,
  55. a.datas,
  56. strip=False,
  57. upx=True,
  58. upx_exclude=[],
  59. name='deemix-server')