summaryrefslogtreecommitdiff
path: root/pkg/build_bundle_with_venv.sh
blob: 15b495c51ab5ed5c7990745f4c50a21af78b9e81 (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
#!/bin/bash
###########################################################
# Build a Bitmask bundle inside a fresh virtualenv.
# To be run by Gitlab Runner,
# will produce an artifact for each build.
###########################################################
# Stop bundling in case of errors
set -e
virtualenv venv
source venv/bin/activate
$VIRTUAL_ENV/bin/pip install appdirs packaging
# $VIRTUAL_ENV/bin/pip install -U pyinstaller==3.1
$VIRTUAL_ENV/bin/pip install -U pyinstaller
$VIRTUAL_ENV/bin/pip install zope.interface zope.proxy

# fix for #8789
$VIRTUAL_ENV/bin/pip --no-cache-dir install pysqlcipher --install-option="--bundled"
# FIXME pixelated needs some things but doesn't declare it
$VIRTUAL_ENV/bin/pip install chardet whoosh
# FIXME persuade pixelated to stop using requests in favor of treq
$VIRTUAL_ENV/bin/pip install requests==2.11.1

# For the Bitmask 0.10 bundles.
$VIRTUAL_ENV/bin/pip install -U leap.soledad.common==0.9.6.post2
$VIRTUAL_ENV/bin/pip install -U leap.soledad.client==0.9.6.post2

# CHANGE THIS IF YOU WANT A DIFFERENT BRANCH CHECKED OUT FOR COMMON/SOLEDAD --------------------
#$VIRTUAL_ENV/bin/pip install -U leap.soledad.common --find-links https://devpi.net/kali/dev 
#$VIRTUAL_ENV/bin/pip install -U leap.soledad.client --find-links https://devpi.net/kali/dev 
# ----------------------------------------------------------------------------------------------

# 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-gui
make dev-mail

$VIRTUAL_ENV/bin/pip uninstall --yes leap.bitmask
$VIRTUAL_ENV/bin/python setup.py sdist bdist_wheel --universal
$VIRTUAL_ENV/bin/pip install dist/*.whl

# install pixelated from kali dev repo until assets get packaged.
pip install pixelated-www pixelated-user-agent --find-links https://downloads.leap.se/libs/pixelated/

# Get the bundled libzmq
$VIRTUAL_ENV/bin/pip uninstall --yes pyzmq
$VIRTUAL_ENV/bin/pip install pyzmq --install-option="--zmq=bundled"

make bundle
make bundle_apps