forked from danielhrisca/asammdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
asammdf.spec
82 lines (72 loc) · 2.21 KB
/
asammdf.spec
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
# -*- mode: python -*-
import os
from pathlib import Path
import sys
sys.setrecursionlimit(sys.getrecursionlimit() * 5)
asammdf_path = Path.cwd() / "src" / "asammdf" / "gui" / "asammdfgui.py"
block_cipher = None
added_files = []
for root, dirs, files in os.walk(asammdf_path.parent / "ui"):
for file in files:
if file.lower().endswith(("ui", "png", "qrc")):
added_files.append((os.path.join(root, file), os.path.join("asammdf", "gui", "ui")))
import pyqtlet2
pyqtlet_path = Path(pyqtlet2.__path__[0]).resolve()
site_packages = pyqtlet_path.parent
site_packages_str = os.path.join(str(site_packages), "")
for root, dirs, files in os.walk(pyqtlet_path):
for file in files:
if not file.lower().endswith(("py", "pyw")):
file_name = os.path.join(root, file)
dest = root.replace(site_packages_str, "")
added_files.append((file_name, dest))
a = Analysis(
[asammdf_path],
pathex=[],
binaries=[],
datas=added_files,
hiddenimports=[
"numpy.core._dtype_ctypes",
"canmatrix.formats",
"canmatrix.formats.dbc",
"canmatrix.formats.arxml",
"asammdf.blocks.cutils",
"import pyqtgraph.canvas.CanvasTemplate_pyside6",
"import pyqtgraph.canvas.TransformGuiTemplate_pyside6",
"import pyqtgraph.console.template_pyside6",
"import pyqtgraph.graphicsItems.PlotItem.plotConfigTemplate_pyside6",
"import pyqtgraph.graphicsItems.ViewBox.axisCtrlTemplate_pyside6",
"import pyqtgraph.GraphicsScene.exportDialogTemplate_pyside6",
"import pyqtgraph.imageview.ImageViewTemplate_pyside6",
],
hookspath=[],
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,
[],
name="asammdfgui",
exclude_binaries=True,
bootloader_ignore_signals=False,
debug=False,
strip=False,
console=False,
icon="asammdf.ico",
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
Tree(asammdf_path.parent),
upx=False,
upx_exclude=[],
name="asammdfgui",
)