forked from danielhrisca/asammdf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
asammdf_noconsole.spec
54 lines (47 loc) · 1.16 KB
/
asammdf_noconsole.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
# -*- mode: python -*-
import sys
import site
from pathlib import Path
if sys.platform.startswith('linux'):
asammdf_path = Path('/home/appveyor/.local/lib/python3.6/site-packages/asammdf/gui/asammdfgui.py')
else:
asammdf_path = Path(site.getsitepackages()[1]) / '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')))
a = Analysis([asammdf_path],
pathex=[],
binaries=[],
datas=added_files,
hiddenimports=[
'numpy.core._dtype_ctypes'
],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher
)
pyz = PYZ(
a.pure,
a.zipped_data,
cipher=block_cipher
)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
Tree(asammdf_path.parent),
name='asammdfgui',
debug=False,
strip=False,
upx=True,
console=False,
icon='asammdf.ico',
)