diff options
Diffstat (limited to 'release')
-rw-r--r-- | release/mitmdump.spec | 5 | ||||
-rw-r--r-- | release/mitmproxy.spec | 5 | ||||
-rw-r--r-- | release/mitmweb.spec | 5 | ||||
-rwxr-xr-x | release/osx-binaries | 57 |
4 files changed, 40 insertions, 32 deletions
diff --git a/release/mitmdump.spec b/release/mitmdump.spec index a84908f5..1707122c 100644 --- a/release/mitmdump.spec +++ b/release/mitmdump.spec @@ -1,14 +1,12 @@ # -*- mode: python -*- from glob import glob -block_cipher = None a = Analysis(['./mitmdump'], hiddenimports=[], hookspath=None, runtime_hooks=None, excludes=None, - cipher=block_cipher, ) a.datas = Tree( "./libmproxy/onboarding/templates", @@ -18,8 +16,7 @@ a.datas += Tree( "./libmproxy/onboarding/static", prefix="libmproxy/onboarding/static" ) -pyz = PYZ(a.pure, - cipher=block_cipher) +pyz = PYZ(a.pure) exe = EXE(pyz, a.scripts, a.binaries, diff --git a/release/mitmproxy.spec b/release/mitmproxy.spec index 546c2899..cc324aa7 100644 --- a/release/mitmproxy.spec +++ b/release/mitmproxy.spec @@ -1,14 +1,12 @@ # -*- mode: python -*- from glob import glob -block_cipher = None a = Analysis(['./mitmproxy'], hiddenimports=[], hookspath=None, runtime_hooks=None, excludes=None, - cipher=block_cipher, ) a.datas = Tree( "./libmproxy/onboarding/templates", @@ -18,8 +16,7 @@ a.datas += Tree( "./libmproxy/onboarding/static", prefix="libmproxy/onboarding/static" ) -pyz = PYZ(a.pure, - cipher=block_cipher) +pyz = PYZ(a.pure) exe = EXE(pyz, a.scripts, a.binaries, diff --git a/release/mitmweb.spec b/release/mitmweb.spec index 4e99da38..b247ce51 100644 --- a/release/mitmweb.spec +++ b/release/mitmweb.spec @@ -1,14 +1,12 @@ # -*- mode: python -*- from glob import glob -block_cipher = None a = Analysis(['./mitmweb'], hiddenimports=[], hookspath=None, runtime_hooks=None, excludes=None, - cipher=block_cipher, ) a.datas = Tree( "./libmproxy/onboarding/templates", @@ -26,8 +24,7 @@ a.datas += Tree( "./libmproxy/web/static", prefix="libmproxy/web/static" ) -pyz = PYZ(a.pure, - cipher=block_cipher) +pyz = PYZ(a.pure) exe = EXE(pyz, a.scripts, a.binaries, diff --git a/release/osx-binaries b/release/osx-binaries index 862ddd59..3cfe0913 100755 --- a/release/osx-binaries +++ b/release/osx-binaries @@ -2,41 +2,58 @@ # Quick and dangerous script for building OSX binaries. -# A few quirks to note, which should be re-checked every release: -# - We require the latest development version of PyInstaller. - -# To run, first install netlib and mitmproxy, then run -# -# ./release/osx-binaries -# -# From the top-level mitmproxy directory. - -usage () -{ - echo 'Usage : ./release/osx-binaries /path/to/pyinstaller.py' - echo 'Run from the top-level mitmproxy directory' - exit -} - -if [ "$1" = "" ] +# At the moment, pyinstaller has no support for entry points, except for this +# hideous hack on the wiki: +# https://github.com/pyinstaller/pyinstaller/wiki/Recipe-Setuptools-Entry-Point +# Once this is fixed, we can ditch the redundant command scripts. + +VENV=../venv.mitmproxy +PYINST_CMD="$VENV/bin/pyinstaller -F --clean" +TMPDIR=./tmp +CACHE="~/Library/Application Support/pyinstaller" + + +if [ ! -d $VENV ] then - usage + echo "Failed: set up a dev environment as described in the README" + echo "and run from the top-level mitmproxy directory." + exit fi +source $VENV/bin/activate + +if [ ! -f $VENV/bin/pyinstaller ] + then + echo "Installing pyinstaller..." + $VENV/bin/pip install \ + --force-reinstall \ + --upgrade \ + https://github.com/pyinstaller/pyinstaller/archive/develop.zip + $VENV/bin/pip install --upgrade macholib +fi + +# readline.so is actually a symlink to a Python file, which breaks PyInstaller +# (and readline itself). Why? Who knows. Re-address this when this stupidity +# ceases to be. +echo "Removing broken readline..." +rm -f $VENV/lib/python2.7/readline.so -TMPDIR=./tmp -PYINST_CMD=$1" -F --clean" +echo "Clearing caches..." rm -f dist/* rm -rf $TMPDIR +rm -rf $CACHE $PYINST_CMD ./release/mitmdump.spec +echo "Running mitmdump..." ./dist/mitmdump --version || exit 1 $PYINST_CMD ./release/mitmproxy.spec +echo "Running mitmproxy..." ./dist/mitmproxy --version || exit 1 $PYINST_CMD ./release/mitmweb.spec +echo "Running mitmweb..." ./dist/mitmweb --version || exit 1 DST=osx-mitmproxy-`./dist/mitmdump --shortversion 2>&1` |