2020-05-15 15:58:27 +00:00
|
|
|
# -*- mode: python ; coding: utf-8 -*-
|
2020-05-26 10:49:48 +00:00
|
|
|
import sys
|
2020-09-08 17:55:36 +00:00
|
|
|
from datetime import date
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
today = date.today().strftime("%Y.%m.%d")
|
2020-09-08 18:09:16 +00:00
|
|
|
commit = subprocess.check_output(['git', 'rev-parse', 'HEAD'])[:10].decode("utf-8")
|
2020-09-08 17:55:36 +00:00
|
|
|
version = f"{today}-{commit}"
|
|
|
|
with open('version.txt', 'w') as f:
|
|
|
|
f.write(version)
|
2020-05-15 15:58:27 +00:00
|
|
|
|
|
|
|
block_cipher = None
|
|
|
|
|
2020-05-26 10:49:48 +00:00
|
|
|
sys.modules['FixTk'] = None
|
2020-05-15 15:58:27 +00:00
|
|
|
|
2020-09-28 11:14:05 +00:00
|
|
|
debug = '-c' in sys.argv or '--console' in sys.argv
|
|
|
|
|
2020-08-22 12:06:59 +00:00
|
|
|
a = Analysis(['deemix-pyweb.py'],
|
2020-05-15 15:58:27 +00:00
|
|
|
binaries=[],
|
2020-09-20 21:15:04 +00:00
|
|
|
datas=[('webui/public', 'webui'), ('icon.ico', '.'), ('version.txt', '.')],
|
2020-09-16 13:16:14 +00:00
|
|
|
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'],
|
2020-05-15 15:58:27 +00:00
|
|
|
hookspath=[],
|
|
|
|
runtime_hooks=[],
|
2020-08-26 19:21:10 +00:00
|
|
|
excludes=['FixTk', 'tcl', 'tk', '_tkinter', 'tkinter', 'Tkinter', 'mkl', 'whl'],
|
2020-05-15 15:58:27 +00:00
|
|
|
win_no_prefer_redirects=False,
|
|
|
|
win_private_assemblies=False,
|
|
|
|
cipher=block_cipher,
|
|
|
|
noarchive=False)
|
|
|
|
pyz = PYZ(a.pure, a.zipped_data,
|
|
|
|
cipher=block_cipher)
|
2020-06-12 16:22:01 +00:00
|
|
|
if sys.platform.startswith('darwin'):
|
|
|
|
exe = EXE(pyz,
|
|
|
|
a.scripts,
|
|
|
|
[],
|
2020-08-27 12:34:39 +00:00
|
|
|
exclude_binaries=True,
|
2020-08-22 12:06:59 +00:00
|
|
|
name='deemix-pyweb',
|
2020-06-12 16:22:01 +00:00
|
|
|
debug=False,
|
|
|
|
bootloader_ignore_signals=False,
|
|
|
|
strip=False,
|
|
|
|
upx=True,
|
2020-09-28 11:14:05 +00:00
|
|
|
console=debug,
|
2020-09-08 12:18:21 +00:00
|
|
|
icon="icon.icns")
|
2020-08-27 12:34:39 +00:00
|
|
|
coll = COLLECT(exe,
|
|
|
|
a.binaries,
|
|
|
|
a.zipfiles,
|
|
|
|
a.datas,
|
|
|
|
strip=False,
|
|
|
|
upx=True,
|
|
|
|
upx_exclude=[],
|
|
|
|
name='deemix-pyweb')
|
|
|
|
app = BUNDLE(coll,
|
2020-08-22 12:06:59 +00:00
|
|
|
name='deemix-pyweb.app',
|
2020-06-12 16:22:01 +00:00
|
|
|
icon="icon.icns",
|
|
|
|
bundle_identifier=None)
|
2020-09-08 12:18:21 +00:00
|
|
|
elif '--onefile' in sys.argv or '-F' in sys.argv:
|
|
|
|
exe = EXE(pyz,
|
|
|
|
a.scripts,
|
|
|
|
a.binaries,
|
|
|
|
a.zipfiles,
|
|
|
|
a.datas,
|
|
|
|
[],
|
|
|
|
name='deemix-pyweb',
|
|
|
|
debug=False,
|
|
|
|
bootloader_ignore_signals=False,
|
|
|
|
strip=False,
|
|
|
|
upx=True,
|
|
|
|
upx_exclude=[],
|
|
|
|
runtime_tmpdir=None,
|
2020-09-28 11:14:05 +00:00
|
|
|
console=debug , icon='icon.ico')
|
2020-06-12 16:22:01 +00:00
|
|
|
else:
|
|
|
|
exe = EXE(pyz,
|
|
|
|
a.scripts,
|
|
|
|
[],
|
2020-06-12 16:23:33 +00:00
|
|
|
exclude_binaries=True,
|
2020-08-22 12:06:59 +00:00
|
|
|
name='deemix-pyweb',
|
2020-06-12 16:22:01 +00:00
|
|
|
debug=False,
|
|
|
|
bootloader_ignore_signals=False,
|
|
|
|
strip=False,
|
|
|
|
upx=True,
|
2020-09-28 11:14:05 +00:00
|
|
|
console=debug,
|
2020-09-08 12:18:21 +00:00
|
|
|
icon="icon.ico")
|
2020-06-12 16:22:01 +00:00
|
|
|
coll = COLLECT(exe,
|
|
|
|
a.binaries,
|
|
|
|
a.zipfiles,
|
|
|
|
a.datas,
|
|
|
|
strip=False,
|
|
|
|
upx=True,
|
|
|
|
upx_exclude=[],
|
2020-08-22 12:06:59 +00:00
|
|
|
name='deemix-pyweb')
|