-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtray.spec
More file actions
96 lines (86 loc) · 2.14 KB
/
Copy pathtray.spec
File metadata and controls
96 lines (86 loc) · 2.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# -*- mode: python ; coding: utf-8 -*-
import os
import sys
base_datas = [
('flameget.png', '.'),
]
base_excludes = [
'tkinter', 'unittest'
]
dynamic_datas = list(base_datas)
dynamic_hiddenimports = []
dynamic_excludes = list(base_excludes)
dynamic_hooksconfig = {}
if os.name == 'nt':
dynamic_hiddenimports.extend(['pystray', 'PIL'])
dynamic_excludes.append('gi')
else:
dynamic_datas.extend([
('icons/xsi-application-exit-symbolic.svg', '.'),
('icons/xsi-view-reveal-symbolic.svg', '.'),
])
dynamic_hiddenimports.extend([
'PyQt5'
])
dynamic_excludes.extend([
'gi.repository.WebKit2', 'gi.repository.Gst',
'gi.repository.GtkSource', 'gi.repository.xlib',
'pystray', 'PIL', 'matplotlib', 'IPython', 'zmq', 'numpy',
'PyQt6', 'PySide2', 'PySide6'
])
dynamic_hooksconfig = {
'gi': {
'module-versions': {
'Gtk': '3.0',
'GdkPixbuf': '2.0',
'AppIndicator3': '0.1',
'GLib': '2.0'
}
}
}
a = Analysis(
['tray.py'],
pathex=[],
binaries=[],
datas=dynamic_datas,
hiddenimports=dynamic_hiddenimports,
hookspath=[],
hooksconfig=dynamic_hooksconfig,
runtime_hooks=[],
excludes=dynamic_excludes,
noarchive=False,
optimize=2,
)
pyz = PYZ(a.pure)
if os.name != 'nt':
filtered_datas = []
for data in a.datas:
dest_path = data[0]
if dest_path.startswith('share') or dest_path.startswith(r'share\\'):
if 'glib-2.0' in dest_path and 'schemas' in dest_path:
filtered_datas.append(data)
else:
pass
else:
filtered_datas.append(data)
a.datas = filtered_datas
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='tray',
debug=False,
bootloader_ignore_signals=False,
strip=True,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)