forked from TangibleDisplay/twiz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
twiz-manager.spec
51 lines (41 loc) · 1.3 KB
/
twiz-manager.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
import os
from os.path import join
IS_LINUX = os.name == 'posix' and os.uname()[0] == 'Linux'
if IS_LINUX:
from PyInstaller.depend import dylib
dylib._unix_excludes.update({
r'.*nvidia.*': 1,
r'.*libdrm.*': 1,
})
dylib.exclude_list = dylib.ExcludeList()
from kivy.tools.packaging.pyinstaller_hooks import get_hooks
a = Analysis(['main.py'],
pathex=['.'],
hiddenimports=['numpy.core.multiarray'],
excludes=['gobject', 'gio', 'PIL', 'gst', 'gtk', 'gi', 'wx', 'twisted', 'curses'] + (['pygame'] if IS_LINUX else []),
**get_hooks()
)
pyz = PYZ(a.pure)
name = 'twiz-manager%s' % ('.exe' if os.name == 'nt' else '')
with open('blacklist.txt') as f:
excludes = [x.strip() for x in f.readlines()]
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name=name,
debug=False,
strip=None,
upx=True,
console=False,
icon=join('data', 'logo.ico'))
coll = COLLECT(exe,
Tree('.',
excludes=excludes),
a.binaries,
a.zipfiles,
a.datas,
strip=None,
upx=True,
name='twiz-manager')
app = BUNDLE(coll,
name='twiz-manager.app',)