-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgarmin_coach.spec
More file actions
155 lines (138 loc) · 3.23 KB
/
Copy pathgarmin_coach.spec
File metadata and controls
155 lines (138 loc) · 3.23 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
# -*- mode: python ; coding: utf-8 -*-
"""
PyInstaller spec file for Garmin Running AI Coach.
Build command:
pyinstaller garmin_coach.spec
"""
import sys
from pathlib import Path
from PyInstaller.utils.hooks import collect_all, collect_data_files, collect_submodules
block_cipher = None
# Collect all necessary packages
datas = []
hiddenimports = []
binaries = []
# Include certifi certificate bundle for SSL
import certifi
datas += [(certifi.where(), 'certifi')]
# Streamlit requires many data files and submodules
streamlit_datas, streamlit_binaries, streamlit_hiddenimports = collect_all('streamlit')
datas += streamlit_datas
binaries += streamlit_binaries
hiddenimports += streamlit_hiddenimports
# Plotly
plotly_datas, plotly_binaries, plotly_hiddenimports = collect_all('plotly')
datas += plotly_datas
binaries += plotly_binaries
hiddenimports += plotly_hiddenimports
# Altair
altair_datas, altair_binaries, altair_hiddenimports = collect_all('altair')
datas += altair_datas
binaries += altair_binaries
hiddenimports += altair_hiddenimports
# Google GenAI (new SDK)
try:
datas += collect_data_files('google.genai')
hiddenimports += collect_submodules('google.genai')
except Exception:
pass
# Ollama
try:
hiddenimports += collect_submodules('ollama')
except Exception:
pass
# Additional hidden imports
hiddenimports += [
'garminconnect',
'pandas',
'numpy',
'PIL',
'dotenv',
'pyarrow',
'packaging',
'pkg_resources',
'pydeck',
'validators',
'gitdb',
'watchdog',
'tornado',
'click',
'toml',
'cachetools',
'protobuf',
'google.protobuf',
'google.auth',
'google.api_core',
'httpx',
'httpcore',
'anyio',
'certifi',
'charset_normalizer',
'idna',
'sniffio',
'h11',
'google.genai',
'ollama',
]
# Add application files
datas += [
('app.py', '.'),
('garmin_client.py', '.'),
('ai_coach.py', '.'),
]
a = Analysis(
['launcher.py'],
pathex=[],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
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,
[],
exclude_binaries=True,
name='GarminRunningCoach',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False, # Set to True for debugging
disable_windowed_traceback=False,
argv_emulation=True, # For macOS
target_arch=None,
codesign_identity=None,
entitlements_file=None,
icon=None, # Add icon path here if available
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name='GarminRunningCoach',
)
# For macOS .app bundle (optional)
if sys.platform == 'darwin':
app = BUNDLE(
coll,
name='GarminRunningCoach.app',
icon=None, # Add .icns icon path here if available
bundle_identifier='com.garmin.runningcoach',
info_plist={
'NSHighResolutionCapable': True,
'CFBundleShortVersionString': '1.0.0',
},
)