forked from veusz/veusz
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathveusz_pyinst.spec
56 lines (48 loc) · 1.63 KB
/
veusz_pyinst.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
# -*- mode: python -*-
# linux pyinstaller file
a = Analysis(['veusz/veusz_main.py'],
pathex=['/home/jss/veusz'],
hiddenimports=[],
hookspath=None,
runtime_hooks=None)
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='veusz',
debug=False,
strip=None,
upx=False,
console=True )
# add necessary documentation, licence
binaries = a.binaries
for bin in ('VERSION', 'ChangeLog', 'AUTHORS', 'README', 'INSTALL', 'COPYING'):
binaries += [ (bin, bin, 'DATA') ]
binaries += [
('embed.py', 'veusz/embed.py', 'DATA'),
('__init__.py', 'veusz/__init__.py', 'DATA'),
]
# add various required files to distribution
for f in ( glob.glob('icons/*.png') + glob.glob('icons/*.ico') +
glob.glob('icons/*.svg') +
glob.glob('examples/*.vsz') +
glob.glob('examples/*.dat') + glob.glob('examples/*.csv') +
glob.glob('examples/*.py') +
glob.glob('ui/*.ui') ):
binaries.append( (f, f, 'DATA') )
excludes = set([
'libfontconfig.so.1', 'libfreetype.so.6', 'libICE.so.6',
'libSM.so.6', 'libX11.so.6', 'libXau.so.6', 'libXdmcp.so.6',
'libXext.so.6', 'libXrender.so.1', 'libz.so.1', 'libutil.so.1',
'libQtNetwork.so.4', 'libreadline.so.5'
])
# remove libraries in the set above
# works a lot better if we do this...
binaries[:] = [b for b in binaries if b[0] not in excludes]
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=None,
upx=False,
name='veusz')