-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.spec
More file actions
93 lines (76 loc) · 2.34 KB
/
Copy pathmain.spec
File metadata and controls
93 lines (76 loc) · 2.34 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
# -*- mode: python -*-
block_cipher = None
a = Analysis(['main.py'],
pathex=['C:\\Code\\openvna\\PyVna'],
binaries=None,
datas=None,
hiddenimports=[],
hookspath=None,
runtime_hooks=None,
excludes = [
"numpy.core._dotblas.pyd",
"scipy.linalg._fblas.pyd",
"scipy.linalg._flapack.pyd",
"scipy.linalg._flinalg.pyd",
"scipy.sparse.linalg.dsolve._superlu",
"scipy.sparse.linalg.eigen.arpack._arpack",
"tcl",
"tkinter",
"_tkinter",
"Tkinter"
],
cipher=block_cipher)
excludes = [
"tcl86t.dll",
"tk86t.dll",
]
# I'm not using matplotlib
for entry in a.datas[:]:
if os.path.dirname(entry[1]).startswith("C:\\Python34\\Lib\\site-packages\\matplotlib"):
a.datas.remove(entry)
for item in a.binaries[:]:
if item[0] in excludes:
a.binaries.remove(item)
# Manually include the VNA dll
a.binaries.append(("vnadll.dll", "../../../x64/Release/vnadll.dll", "BINARY"))
# And the icon
a.binaries.append(("Akela Logo.ico", "./Akela Logo.ico", "BINARY"))
# Throw in the runtime library kitchen sink. It can't hurt, and might help.
# Worst case, the binary is now a bit bigger.
a.binaries.append(("msvcp100d.dll", "C:/Windows/System32/msvcp100d.dll", "BINARY"))
a.binaries.append(("msvcr100d.dll", "C:/Windows/System32/msvcr100d.dll", "BINARY"))
a.binaries.append(("msvcp120d.dll", "C:/Windows/System32/msvcp120d.dll", "BINARY"))
a.binaries.append(("msvcr120d.dll", "C:/Windows/System32/msvcr120d.dll", "BINARY"))
a.binaries.append(("msvcp100.dll", "C:/Windows/System32/msvcp100.dll", "BINARY"))
a.binaries.append(("msvcr100.dll", "C:/Windows/System32/msvcr100.dll", "BINARY"))
a.binaries.append(("msvcp120.dll", "C:/Windows/System32/msvcp120.dll", "BINARY"))
a.binaries.append(("msvcr120.dll", "C:/Windows/System32/msvcr120.dll", "BINARY"))
pyz = PYZ(a.pure, a.zipped_data)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
# exclude_binaries=True,
name = 'PyOpenVNA 1.6.exe',
debug = False,
strip = None,
upx = False,
console = True,
icon = "./Akela Logo.ico"
)
# exe = EXE(pyz,
# a.scripts,
# exclude_binaries=True,
# name='OpenVNA.exe',
# debug=False,
# strip=None,
# upx=False,
# console=True )
# coll = COLLECT(exe,
# a.binaries,
# a.zipfiles,
# a.datas,
# strip=None,
# upx=False,
# name='OpenVNA')