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.
 
 

88 lines
2.9 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(['deemix-pyweb.py'],
  13. binaries=[],
  14. datas=[('webui/public', 'webui'), ('icon.ico', '.'), ('version.txt', '.')],
  15. hiddenimports=['PyQt5', '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', 'mkl', 'whl'],
  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 sys.platform.startswith('darwin'):
  26. exe = EXE(pyz,
  27. a.scripts,
  28. [],
  29. exclude_binaries=True,
  30. name='deemix-pyweb',
  31. debug=False,
  32. bootloader_ignore_signals=False,
  33. strip=False,
  34. upx=True,
  35. console=False,
  36. icon="icon.icns")
  37. coll = COLLECT(exe,
  38. a.binaries,
  39. a.zipfiles,
  40. a.datas,
  41. strip=False,
  42. upx=True,
  43. upx_exclude=[],
  44. name='deemix-pyweb')
  45. app = BUNDLE(coll,
  46. name='deemix-pyweb.app',
  47. icon="icon.icns",
  48. bundle_identifier=None)
  49. elif '--onefile' in sys.argv or '-F' in sys.argv:
  50. exe = EXE(pyz,
  51. a.scripts,
  52. a.binaries,
  53. a.zipfiles,
  54. a.datas,
  55. [],
  56. name='deemix-pyweb',
  57. debug=False,
  58. bootloader_ignore_signals=False,
  59. strip=False,
  60. upx=True,
  61. upx_exclude=[],
  62. runtime_tmpdir=None,
  63. console=False , icon='icon.ico')
  64. else:
  65. exe = EXE(pyz,
  66. a.scripts,
  67. [],
  68. exclude_binaries=True,
  69. name='deemix-pyweb',
  70. debug=False,
  71. bootloader_ignore_signals=False,
  72. strip=False,
  73. upx=True,
  74. console=False,
  75. icon="icon.ico")
  76. coll = COLLECT(exe,
  77. a.binaries,
  78. a.zipfiles,
  79. a.datas,
  80. strip=False,
  81. upx=True,
  82. upx_exclude=[],
  83. name='deemix-pyweb')