-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema_validator.spec
More file actions
147 lines (134 loc) · 3.48 KB
/
Copy pathschema_validator.spec
File metadata and controls
147 lines (134 loc) · 3.48 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
# -*- mode: python ; coding: utf-8 -*-
import os
import sys
from pathlib import Path
from PyInstaller.utils.hooks import collect_data_files
# Get the current directory
current_dir = Path.cwd()
schema_validator_dir = current_dir / 'schema_validator'
# Define the main script
main_script = schema_validator_dir / '__main__.py'
# Collect all data files
datas = []
# Add templates
templates_dir = schema_validator_dir / 'web' / 'templates'
if templates_dir.exists():
datas.append((str(templates_dir), 'schema_validator/web/templates'))
# Add static files
static_dir = schema_validator_dir / 'web' / 'static'
if static_dir.exists():
datas.append((str(static_dir), 'schema_validator/web/static'))
# Add config files
config_files = [
'schema_validator/config.py',
'schema_validator/__init__.py'
]
for config_file in config_files:
if Path(config_file).exists():
datas.append((config_file, 'schema_validator'))
# Hidden imports for Flask and related packages
hiddenimports = [
'flask',
'flask_socketio',
'socketio',
'eventlet',
'gevent',
'geventwebsocket',
'engineio',
'playwright',
'playwright._impl',
'playwright._impl._api_structures',
'playwright._impl._browser_type',
'playwright._impl._browser',
'playwright._impl._browser_context',
'playwright._impl._page',
'playwright._impl._element_handle',
'playwright._impl._locator',
'playwright._impl._frame',
'playwright._impl._network',
'playwright._impl._cdp_session',
'playwright._impl._connection',
'playwright._impl._transport',
'playwright._impl._helper',
'playwright._impl._errors',
'playwright._impl._api_types',
'playwright._impl._generated',
'playwright._impl._generated.types',
'playwright._impl._generated.errors',
'playwright._impl._generated.api_structures',
'playwright._impl._generated.api_types',
'playwright._impl._generated.client',
'playwright._impl._generated.server',
'playwright._impl._generated.types',
'playwright._impl._generated.errors',
'playwright._impl._generated.api_structures',
'playwright._impl._generated.api_types',
'playwright._impl._generated.client',
'playwright._impl._generated.server',
'jsonschema',
'validators',
'beautifulsoup4',
'requests',
'tqdm',
'openpyxl',
'jinja2',
'werkzeug',
'markupsafe',
'itsdangerous',
'click',
'blinker',
'python-socketio',
'python-engineio'
]
# Exclude unnecessary modules to reduce size
excludes = [
'tkinter',
'matplotlib',
'numpy',
'pandas',
'scipy',
'PIL',
'cv2',
'tensorflow',
'torch',
'sklearn'
]
block_cipher = None
a = Analysis(
[str(main_script)],
pathex=[str(current_dir)],
binaries=[],
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=excludes,
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='schema-validator',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=False, # Set to False for GUI app
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=None
)