summaryrefslogtreecommitdiff
path: root/pkg/build_bundle_with_venv.sh
blob: e6f05f013064950ec594a7a804b214953bbe5889 (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
#!/bin/bash
###########################################################
# Build a Bitmask bundle inside a fresh virtualenv (LINUX).
# To be run by Gitlab Runner,
# will produce an artifact for each build.
###########################################################

# Stop bundling in case of errors
set -e

VENV=venv

echo "[+] BUILDING BITMASK BUNDLE..."
echo "[+] GIT VERSION" `git describe`

if [ ! -d "$VENV" ]; then
  echo "[+] creating virtualenv in venv"
  virtualenv $VENV
fi
source "$VENV"/bin/activate
echo "[+] Using venv in" $VIRTUAL_ENV

$VIRTUAL_ENV/bin/pip install appdirs packaging
# CHANGE THIS TO SELECT A DIFFERENT PYINSTALLER VERSION ------------------------------------------
# qt-plugins instability in develop: see https://github.com/pyinstaller/pyinstaller/issues/1906
# $VIRTUAL_ENV/bin/pip install -U pyinstaller==3.2.1
# dev version
# $VIRTUAL_ENV/bin/pip install -U git+https://github.com/pyinstaller/pyinstaller.git@develop
# try bjones WIP Qt5 branch
$VIRTUAL_ENV/bin/pip install -U git+https://github.com/bjones1/pyinstaller.git@pyqt5_fix
# ------------------------------------------------------------------------------------------------
$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
# FIXME remove requests in pixelated fork, use treq instead
#$VIRTUAL_ENV/bin/pip install requests==2.11.1

# Soledad version: for the Bitmask 0.10 bundles, let's pick published soledad.
$VIRTUAL_ENV/bin/pip install -U leap.soledad
# CHANGE THIS IF YOU WANT A DIFFERENT BRANCH CHECKED OUT FOR COMMON/SOLEDAD --------------------
#$VIRTUAL_ENV/bin/pip install -U leap.soledad --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

echo "[+] Installing Bitmask from latest wheel..."
$VIRTUAL_ENV/bin/pip install `ls -tr dist/*.whl | tail -n 1`

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

# Get latest tags from repo
git fetch --tags
make bundle_linux