-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAltarExtractor.spec
More file actions
145 lines (129 loc) · 3.71 KB
/
Copy pathAltarExtractor.spec
File metadata and controls
145 lines (129 loc) · 3.71 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
# -*- mode: python ; coding: utf-8 -*-
import sys
import os
import glob
from PyInstaller.utils.hooks import collect_data_files, collect_submodules, collect_dynamic_libs
# Find Python's DLLs directory and add pyexpat
python_dir = os.path.dirname(sys.executable)
dlls_dir = os.path.join(python_dir, 'DLLs')
# Also check Anaconda's DLLs directory (common when using venv from Anaconda)
anaconda_dlls = r'C:\ProgramData\anaconda3\DLLs'
# Collect dash and related packages data files
datas = []
# Add dash and its components data files
datas += collect_data_files('dash')
datas += collect_data_files('dash_core_components')
datas += collect_data_files('dash_html_components')
datas += collect_data_files('dash_table')
datas += collect_data_files('dash_bootstrap_components')
datas += collect_data_files('plotly')
# Try to add pygwalker data if available
try:
datas += collect_data_files('pygwalker')
except Exception:
pass
# Add assets folder
datas += [('assets', 'assets')]
# Add altar_extractor package
datas += [('altar_extractor', 'altar_extractor')]
# Collect binaries (for DLLs like pyexpat)
binaries = []
# Add pyexpat and other Python DLLs explicitly from multiple locations
dll_patterns = ['pyexpat*.pyd', 'pyexpat*.dll', '_elementtree*.pyd', 'libexpat*.dll']
dll_search_paths = [dlls_dir, python_dir, anaconda_dlls]
for search_path in dll_search_paths:
if os.path.exists(search_path):
for dll_pattern in dll_patterns:
for dll_path in glob.glob(os.path.join(search_path, dll_pattern)):
binaries.append((dll_path, '.'))
try:
binaries += collect_dynamic_libs('lxml')
except Exception:
pass
# Collect hidden imports
hiddenimports = [
'dash',
'dash.dcc',
'dash.html',
'dash.dash_table',
'dash_bootstrap_components',
'flask',
'werkzeug',
'jinja2',
'plotly',
'plotly.graph_objects',
'plotly.express',
'pandas',
'pymongo',
'dnspython',
'bson',
'pygwalker',
'pygwalker.api.html',
'altar_extractor',
'altar_extractor.callbacks',
'altar_extractor.callbacks.connection',
'altar_extractor.callbacks.experiments',
'altar_extractor.callbacks.filters',
'altar_extractor.callbacks.metrics',
'altar_extractor.callbacks.pygwalker',
'altar_extractor.callbacks.ui',
'altar_extractor.components',
'altar_extractor.components.layout',
'altar_extractor.config',
'altar_extractor.services',
'altar_extractor.services.data',
'altar_extractor.services.mongo',
'altar_extractor.state',
'altar_extractor.state.cache',
# XML and encoding modules (fix pyexpat DLL error)
'xml',
'xml.parsers',
'xml.parsers.expat',
'pyexpat',
'encodings',
'codecs',
'pkg_resources',
'packaging',
'packaging.version',
'packaging.specifiers',
'packaging.requirements',
]
# Collect all dash submodules
hiddenimports += collect_submodules('dash')
hiddenimports += collect_submodules('dash_bootstrap_components')
hiddenimports += collect_submodules('plotly')
hiddenimports += collect_submodules('pkg_resources')
a = Analysis(
['main.py'],
pathex=[],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='AltarExtractor',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True, # Keep console to see server output and URL
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)