summaryrefslogtreecommitdiff
path: root/pkg/pyinst/app.spec
blob: 5a99a6c63de9a5a10f7128df76068a68492825dc (plain)
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
# -*- mode: python -*-
import platform

block_cipher = None

hiddenimports = [
     'scrypt', 'zope.interface', 'zope.proxy',
     'pixelated_www', 'pixelated_user_agent',
     'pysqlcipher', 'service_identity',
     'leap.common', 'leap.bitmask', 
     'leap.bitmask.core.logs',
     'leap.bitmask.gui.icons_rc',
     'leap.soledad.common.document', 
     'leap.bitmask_js',
     'packaging', 'packaging.version', 'packaging.specifiers',
     'packaging.requirements']

if platform.system() == 'Windows':
    print "Platform=Windows, using pyside..."
    hiddenimports.extend(
        ['PySide.QtCore', 'PySide.QtGui', 'PySide.QtWebKit',
	# for some reason pyinstaller 3.1 complains about missing
	# packages that should have been vendored
	'appdirs',
	'packaging', 'packaging.version', 'packaging.specifiers',
	'packaging.requirements',
	'python-gnupg'])
    excludes = ['PyQt5']
else:
    hiddenimports.extend(
        ['PyQt5.QtCore', 'PyQt5.QtGui', 'PyQt5.QtWebKit'])
    excludes = ['PySide']

import os
VENV = os.environ.get('VIRTUAL_ENV', '')

a = Analysis(['../../src/leap/bitmask/gui/app.py'],
             pathex=[
	         '/usr/lib/python2.7/dist-packages/',
	        VENV + '/Lib/site-packages/',
	        VENV + '/Lib/site-packages/leap/soledad'],
             binaries=None,
             datas=None,
             hiddenimports=hiddenimports,
             hookspath=[],
             runtime_hooks=[],
             excludes=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,
          exclude_binaries=True,
          name='bitmask',
          debug=True,
          strip=False,
          upx=True,
	  # TODO remove console for win
          console=True,
          icon='../branding/mask-icon.ico')
coll = COLLECT(exe,
               a.binaries,
               a.zipfiles,
               a.datas,
               strip=False,
               upx=True,
               name='bitmask')