-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.spec
More file actions
99 lines (94 loc) · 3.11 KB
/
build.spec
File metadata and controls
99 lines (94 loc) · 3.11 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
# -*- mode: python ; coding: utf-8 -*-
"""PyInstaller 打包配置 - 网络运维工具箱"""
import os
ROOT = os.path.dirname(os.path.abspath(SPEC))
a = Analysis(
[os.path.join(ROOT, 'main.py')],
pathex=[ROOT],
binaries=[],
datas=[
(os.path.join(ROOT, 'resources', 'themes'), os.path.join('resources', 'themes')),
(os.path.join(ROOT, 'resources', 'iperf3.exe'), 'resources'),
(os.path.join(ROOT, 'resources', 'cygwin1.dll'), 'resources'),
(os.path.join(ROOT, 'data', 'oui.csv'), 'data'),
],
hiddenimports=[
'tools.ping.widget',
'tools.tcp_ping.widget',
'tools.mtr.widget',
'tools.iperf3.widget',
'tools.dns_query.widget',
'tools.port_scan.widget',
'tools.http_test.widget',
'tools.batch_ping.widget',
'tools.subnet_calc.widget',
'tools.whois_query.widget',
'tools.local_info.widget',
'tools.route_arp.widget',
'tools.net_scan.widget',
'tools.mac_lookup.widget',
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[
# matplotlib 被 pyqtgraph 间接拉入,实际未使用
'matplotlib', 'matplotlib.backends', 'mpl_toolkits',
# PIL/Pillow 被 matplotlib 拉入
'PIL', 'Pillow',
# 加密库,项目不需要
'cryptography', 'bcrypt',
# 代码高亮,不需要
'pygments',
# 异步框架,不需要
'anyio', 'sniffio',
# Jupyter/IPython 相关
'IPython', 'jupyter', 'notebook', 'nbconvert', 'nbformat',
# 测试框架
'pytest', 'unittest',
# 未使用的 PySide6 模块
'PySide6.QtSvg', 'PySide6.QtSvgWidgets',
'PySide6.QtTest', 'PySide6.QtXml',
'PySide6.QtMultimedia', 'PySide6.QtMultimediaWidgets',
'PySide6.QtBluetooth', 'PySide6.QtNfc',
'PySide6.QtPositioning', 'PySide6.QtLocation',
'PySide6.QtSensors', 'PySide6.QtSerialPort',
'PySide6.QtWebChannel', 'PySide6.QtWebEngineCore',
'PySide6.QtWebEngineWidgets', 'PySide6.QtWebSockets',
'PySide6.Qt3DCore', 'PySide6.Qt3DRender',
'PySide6.Qt3DInput', 'PySide6.Qt3DLogic',
'PySide6.Qt3DExtras', 'PySide6.Qt3DAnimation',
'PySide6.QtQuick', 'PySide6.QtQuickWidgets', 'PySide6.QtQml',
'PySide6.QtDesigner', 'PySide6.QtHelp',
'PySide6.QtPdf', 'PySide6.QtPdfWidgets',
'PySide6.QtCharts', 'PySide6.QtDataVisualization',
'PySide6.QtRemoteObjects', 'PySide6.QtScxml',
'PySide6.QtStateMachine',
# setuptools/pkg 打包工具
'setuptools', 'distutils', 'pkg_resources',
# jinja2 模板引擎
'jinja2',
],
noarchive=False,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='网络运维工具箱',
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,
)