-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathethoscore.spec
More file actions
176 lines (160 loc) · 5 KB
/
Copy pathethoscore.spec
File metadata and controls
176 lines (160 loc) · 5 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# -*- mode: python ; coding: utf-8 -*-
"""
PyInstaller spec for Ethoscore.
Properly collects all hidden imports, Qt plugins, and data files
needed for pandas, numpy, opencv-python, PySide6, and pygame.
"""
import sys
from PyInstaller.utils.hooks import collect_submodules, collect_data_files
block_cipher = None
# ---------------------------------------------------------------------------
# Data files: assets (SVGs, images) needed at runtime
# ---------------------------------------------------------------------------
datas = [
('assets', 'assets'),
]
# ---------------------------------------------------------------------------
# Hidden imports: modules PyInstaller might miss due to dynamic imports
# ---------------------------------------------------------------------------
hidden_imports = [
# pandas C-extension submodules
'pandas._libs',
'pandas._libs.tslibs',
'pandas._libs.tslibs.base',
'pandas._libs.tslibs.conversion',
'pandas._libs.tslibs.dtypes',
'pandas._libs.tslibs.fields',
'pandas._libs.tslibs.nattypes',
'pandas._libs.tslibs.np_datetime',
'pandas._libs.tslibs.offsets',
'pandas._libs.tslibs.parsing',
'pandas._libs.tslibs.strptime',
'pandas._libs.tslibs.timestamps',
'pandas._libs.tslibs.timezones',
'pandas._libs.tslibs.timedeltas',
'pandas._libs.window.aggregations',
'pandas._libs.algos',
'pandas._libs.hashtable',
'pandas._libs.index',
'pandas._libs.internals',
'pandas._libs.join',
'pandas._libs.lib',
'pandas._libs.missing',
'pandas._libs.nanops',
'pandas._libs.ops',
'pandas._libs.parsers',
'pandas._libs.properties',
'pandas._libs.reshape',
'pandas._libs.sas',
'pandas._libs.scanner',
'pandas._libs.sparse',
'pandas._libs.testing',
'pandas._libs.writers',
'pandas.io.sas.sas7bdat',
'pandas.io.sas.sas_xport',
'pandas.io.sas.sas_constants',
'pandas.io.clipboard',
'pandas.io.excel',
'pandas.io.parsers',
'pandas.io.sql',
'pandas.plotting',
'pandas.compat',
'pandas.compat.pickle_compat',
# numpy submodules
'numpy.core._methods_',
'numpy.lib.format',
'numpy.linalg',
'numpy.random',
'numpy.fft',
'numpy.polynomial',
# opencv
'cv2.data',
'cv2.gapi',
# PySide6
'PySide6.support',
'PySide6.QtNetwork',
'PySide6.QtXml',
'PySide6.QtSvg',
'PySide6.QtSvgWidgets',
# pygame
'pygame.surface',
'pygame.display',
'pygame.joystick',
'pygame.key',
'pygame.event',
'pygame.time',
'pygame.image',
'pygame.pixelcopy',
# annotator_libs submodules (explicit to be safe)
'annotator_libs.annotation_logic',
'annotator_libs.gamification_logic',
'annotator_libs.ui_components',
'annotator_libs.video_handling',
]
# ---------------------------------------------------------------------------
# Collect all submodules for packages with C extensions
# ---------------------------------------------------------------------------
hidden_imports += collect_submodules('pandas')
hidden_imports += collect_submodules('numpy')
hidden_imports += collect_submodules('cv2')
hidden_imports += collect_submodules('PySide6')
hidden_imports += collect_submodules('pygame')
# ---------------------------------------------------------------------------
# Collect Qt plugins (platforms, image formats, styles, etc.)
# ---------------------------------------------------------------------------
qt_plugins = collect_data_files('PySide6', include_py_files=True)
datas.extend(qt_plugins)
# Collect OpenCV data files (XML haar cascades, etc.)
cv_datas = collect_data_files('cv2', include_py_files=False)
datas.extend(cv_datas)
# ---------------------------------------------------------------------------
# Analysis
# ---------------------------------------------------------------------------
a = Analysis(
['ethoscore.py'],
pathex=[],
binaries=[],
datas=datas,
hiddenimports=list(set(hidden_imports)), # deduplicate
hookspath=[],
hooksconfig={},
runtime_hooks=['hooks/rthook_qt_plugins.py'],
excludes=[
'tkinter',
'matplotlib',
'scipy',
'IPython',
'setuptools',
'pip',
'Cython',
'PyQt5',
],
noarchive=False,
)
# ---------------------------------------------------------------------------
# PYZ archive (compressed bytecode)
# ---------------------------------------------------------------------------
pyz = PYZ(a.pure)
# ---------------------------------------------------------------------------
# EXE – one-file, no console (windowed mode)
# ---------------------------------------------------------------------------
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='ethoscore',
debug=False,
bootloader_ignore_signals=False,
strip=False,
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,
)