summaryrefslogtreecommitdiff
path: root/pkg/pyinst/app.spec
diff options
context:
space:
mode:
authorKali Kaneko (leap communications) <kali@leap.se>2016-10-21 16:56:41 -0400
committerKali Kaneko (leap communications) <kali@leap.se>2016-10-21 17:17:30 -0400
commitb9f8766d72728093f6183c289d23ecd8a1fa562f (patch)
tree8f82ba9b16743e2d77ae1c53d602eeb604f7968f /pkg/pyinst/app.spec
parentd063b5a2c32b867e5284121551951cc8e695aa9a (diff)
[pkg] native pyinstaller packaging
Diffstat (limited to 'pkg/pyinst/app.spec')
-rw-r--r--pkg/pyinst/app.spec47
1 files changed, 35 insertions, 12 deletions
diff --git a/pkg/pyinst/app.spec b/pkg/pyinst/app.spec
index e6304391..5869b604 100644
--- a/pkg/pyinst/app.spec
+++ b/pkg/pyinst/app.spec
@@ -1,25 +1,47 @@
# -*- mode: python -*-
+import platform
block_cipher = None
+hiddenimports = [
+ 'scrypt', 'zope.interface', 'zope.proxy',
+ 'pysqlcipher', 'service_identity',
+ 'leap.common', 'leap.bitmask',
+ 'leap.bitmask.core.logs',
+ 'leap.soledad.common.document',
+ 'leap.bitmask_js']
+
+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/'],
+ '/usr/lib/python2.7/dist-packages/',
+ VENV + '/Lib/site-packages/',
+ VENV + '/Lib/site-packages/leap/soledad'],
binaries=None,
datas=None,
- hiddenimports=[
- 'scrypt',
- 'zope.interface', 'zope.proxy',
- 'PyQt5.QtCore', 'PyQt5.QtGui', 'PyQt5.QtWebKit',
- 'pysqlcipher', 'service_identity',
- 'leap.common', 'leap.bitmask',
- 'leap.bitmask.core.logs',
- 'leap.bitmask_js',
- ],
+ hiddenimports=hiddenimports,
hookspath=[],
runtime_hooks=[],
- excludes=[],
+ excludes=excludes,
+
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
@@ -29,9 +51,10 @@ exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='bitmask',
- debug=False,
+ debug=True,
strip=False,
upx=True,
+ # TODO remove console for win
console=True )
coll = COLLECT(exe,
a.binaries,