Skip to content

Commit 08b374e

Browse files
committed
Add all-in-one bundle.spec for PyInstaller packaging
1 parent 0f0f83b commit 08b374e

File tree

3 files changed

+128
-1
lines changed

3 files changed

+128
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ MANIFEST
3131
# Usually these files are written by a python script from a template
3232
# before PyInstaller builds the exe, so as to inject date/other infos into it.
3333
*.manifest
34-
*.spec
3534

3635
# Installer logs
3736
pip-log.txt

bundle.spec

Lines changed: 127 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
# -*- mode: python ; coding: utf-8 -*-
2+
3+
# Configuration Wizard
4+
5+
configure_a = Analysis(
6+
['configure.py'],
7+
pathex=[],
8+
binaries=[],
9+
datas=[('res', 'res'), ('config.yaml', '.')],
10+
hiddenimports=[],
11+
hookspath=[],
12+
hooksconfig={},
13+
runtime_hooks=[],
14+
excludes=[],
15+
noarchive=False,
16+
optimize=0,
17+
)
18+
configure_pyz = PYZ(configure_a.pure)
19+
20+
configure_exe = EXE(
21+
configure_pyz,
22+
configure_a.scripts,
23+
[],
24+
exclude_binaries=True,
25+
name='configure',
26+
debug=False,
27+
bootloader_ignore_signals=False,
28+
strip=False,
29+
upx=True,
30+
console=False,
31+
disable_windowed_traceback=False,
32+
argv_emulation=False,
33+
target_arch=None,
34+
codesign_identity=None,
35+
entitlements_file=None,
36+
icon=['res\\icons\\monitor-icon-17865\\icon.ico'],
37+
)
38+
39+
# System Monitor main program
40+
41+
main_a = Analysis(
42+
['main.py'],
43+
pathex=[],
44+
binaries=[],
45+
datas=[('res', 'res'), ('config.yaml', '.')],
46+
hiddenimports=[],
47+
hookspath=[],
48+
hooksconfig={},
49+
runtime_hooks=[],
50+
excludes=[],
51+
noarchive=False,
52+
optimize=0,
53+
)
54+
main_pyz = PYZ(main_a.pure)
55+
56+
main_exe = EXE(
57+
main_pyz,
58+
main_a.scripts,
59+
[],
60+
exclude_binaries=True,
61+
name='main',
62+
debug=False,
63+
bootloader_ignore_signals=False,
64+
strip=False,
65+
upx=True,
66+
console=False,
67+
disable_windowed_traceback=False,
68+
argv_emulation=False,
69+
target_arch=None,
70+
codesign_identity=None,
71+
entitlements_file=None,
72+
icon=['res\\icons\\monitor-icon-17865\\icon.ico'],
73+
)
74+
75+
# Theme Editor
76+
77+
editor_a = Analysis(
78+
['theme-editor.py'],
79+
pathex=[],
80+
binaries=[],
81+
datas=[('res', 'res'), ('config.yaml', '.')],
82+
hiddenimports=[],
83+
hookspath=[],
84+
hooksconfig={},
85+
runtime_hooks=[],
86+
excludes=[],
87+
noarchive=False,
88+
optimize=0,
89+
)
90+
editor_pyz = PYZ(editor_a.pure)
91+
92+
editor_exe = EXE(
93+
editor_pyz,
94+
editor_a.scripts,
95+
[],
96+
exclude_binaries=True,
97+
name='theme-editor',
98+
debug=False,
99+
bootloader_ignore_signals=False,
100+
strip=False,
101+
upx=True,
102+
console=False,
103+
disable_windowed_traceback=False,
104+
argv_emulation=False,
105+
target_arch=None,
106+
codesign_identity=None,
107+
entitlements_file=None,
108+
icon=['res\\icons\\monitor-icon-17865\\icon.ico'],
109+
)
110+
111+
# Common collect task
112+
113+
coll = COLLECT(
114+
configure_exe,
115+
configure_a.binaries,
116+
configure_a.datas,
117+
main_exe,
118+
main_a.binaries,
119+
main_a.datas,
120+
editor_exe,
121+
editor_a.binaries,
122+
editor_a.datas,
123+
strip=False,
124+
upx=True,
125+
upx_exclude=[],
126+
name='turing-system-monitor',
127+
)

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ tkinter-tooltip~=3.1.2 # Tooltips for configuration editor
1010
uptime~=3.0.1 # For System Uptime
1111
requests~=2.32.3 # HTTP library
1212
ping3~=4.0.8 # ICMP ping implementation using raw socket
13+
pyinstaller~=6.11.1 # bundles a Python application and all its dependencies into a single package
1314

1415
# Image generation
1516
Pillow~=10.4.0; python_version < "3.9" # For Python 3.8 max.

0 commit comments

Comments
 (0)