summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2018-03-05 14:01:39 +0100
committerKali Kaneko <kali@leap.se>2018-03-05 14:01:39 +0100
commit4f20bc9ca0e6e1132d2691483058337228f0173c (patch)
treeaf54dc7d2ad7a7f70f4e1ef02e7f31e02aca5dc3
parent081a8c9cb491ebc5c32eb686c66a52e041e227bf (diff)
[pkg] add target for building riseupvpn in osx venv
-rw-r--r--Makefile3
-rwxr-xr-xpkg/build_osx_bundle_riseupvpn_with_venv.sh34
2 files changed, 37 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1132732f..f6895358 100644
--- a/Makefile
+++ b/Makefile
@@ -109,6 +109,9 @@ bundle_riseupvpn:
# to chown it first.
cat pkg/bundle_riseupvpn_from_docker | docker run -i -v /srv/bitmask-builds:/dist -w /dist -e REPO="$(REPO)" -e BRANCH="$(BRANCH)" bitmask-bundler-apt bash
+bundle_riseupvpn_osx_in_virtualenv:
+ pkg/build_osx_bundle_riseupvpn_with_venv.sh
+
bundle_in_docker_virtualenv:
# this runs bundles inside a virtualenv. it is kind of slow because it compiles all python extensions in dependencies each time.
cat pkg/bundle_from_docker_venv | docker run -i -v ~/leap/bitmask-dev:/dist -w /dist -u `id -u` -e REPO="$(REPO)" -e BRANCH="$(BRANCH)" bitmask-bundler-venv bash
diff --git a/pkg/build_osx_bundle_riseupvpn_with_venv.sh b/pkg/build_osx_bundle_riseupvpn_with_venv.sh
new file mode 100755
index 00000000..7f819849
--- /dev/null
+++ b/pkg/build_osx_bundle_riseupvpn_with_venv.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+###########################################################
+# Build a RiseupVPN bundle inside a fresh virtualenv (OSX).
+###########################################################
+
+# Stop bundling in case of errors
+set -e
+
+VENV=venv
+
+echo "[+] BUILDING RiseupVPN 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 -U pyinstaller
+$VIRTUAL_ENV/bin/pip install zope.interface zope.proxy
+
+$VIRTUAL_ENV/bin/pip install -r pkg/requirements-osx.pip
+
+# Get the bundled libzmq
+$VIRTUAL_ENV/bin/pip install -I pyzmq --install-option="--zmq=bundled"
+
+# Install bitmask in development mode
+$VIRTUAL_ENV/bin/pip install -e .
+
+# Get latest tags from repo
+git fetch --tags
+make bundle_anonvpn_osx