From 981e4b6e66fc807fd36086e37296e40da914a0ff Mon Sep 17 00:00:00 2001 From: "Kali Kaneko (leap communications)" Date: Sun, 6 Nov 2016 17:55:07 +0100 Subject: [ci] generate bundle from gitlab runner some hacks needed, it seems pyinstaller is choking again on namespace packages for some reason that is beyond my current comprenhension. --- pkg/build_bundle_with_venv.sh | 19 +++++++++++++++++++ pkg/pyinst/app.spec | 4 +++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100755 pkg/build_bundle_with_venv.sh (limited to 'pkg') diff --git a/pkg/build_bundle_with_venv.sh b/pkg/build_bundle_with_venv.sh new file mode 100755 index 0000000..929710a --- /dev/null +++ b/pkg/build_bundle_with_venv.sh @@ -0,0 +1,19 @@ +#!/bin/bash +virtualenv venv +source venv/bin/activate +$VIRTUAL_ENV/bin/pip install -U pyinstaller==3.1 packaging +$VIRTUAL_ENV/bin/pip install zope.interface zope.proxy +$VIRTUAL_ENV/bin/pip install leap.soledad.common +$VIRTUAL_ENV/bin/pip install leap.soledad.client + +# XXX hack for the namespace package not being properly handled by pyinstaller +touch $VIRTUAL_ENV/lib/python2.7/site-packages/zope/__init__.py +touch $VIRTUAL_ENV/lib/python2.7/site-packages/leap/soledad/__init__.py + +make dev-all + +$VIRTUAL_ENV/bin/pip uninstall leap.bitmask +$VIRTUAL_ENV/bin/pip install . + +make bundle +make bundle_tar diff --git a/pkg/pyinst/app.spec b/pkg/pyinst/app.spec index 5869b60..347a50e 100644 --- a/pkg/pyinst/app.spec +++ b/pkg/pyinst/app.spec @@ -9,7 +9,9 @@ hiddenimports = [ 'leap.common', 'leap.bitmask', 'leap.bitmask.core.logs', 'leap.soledad.common.document', - 'leap.bitmask_js'] + 'leap.bitmask_js', + 'packaging', 'packaging.version', 'packaging.specifiers', + 'packaging.requirements'] if platform.system() == 'Windows': print "Platform=Windows, using pyside..." -- cgit v1.2.3