From 9e94fdc6db83bc2d11b6a9cd1df5222827df3ce8 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 15 May 2013 11:25:25 +1200 Subject: Make ready for pyinstaller. --- mitmdump | 3 ++- mitmproxy | 2 +- release/contributors | 2 ++ release/pyinstaller-mitmdump.spec | 20 ++++++++++++++++++++ release/pyinstaller-mitmproxy.spec | 16 ++++++++++++++++ scripts/contributors | 2 -- 6 files changed, 41 insertions(+), 4 deletions(-) create mode 100755 release/contributors create mode 100644 release/pyinstaller-mitmdump.spec create mode 100644 release/pyinstaller-mitmproxy.spec delete mode 100755 scripts/contributors diff --git a/mitmdump b/mitmdump index 5d2a9e44..da3c80e1 100755 --- a/mitmdump +++ b/mitmdump @@ -16,7 +16,8 @@ # along with this program. If not, see . import sys, signal -from libmproxy import proxy, dump, cmdline, version +# The unneccesary console import here is to work around a bug in pyinstaller +from libmproxy import proxy, dump, cmdline, version, console import argparse if __name__ == '__main__': diff --git a/mitmproxy b/mitmproxy index e4d72ed8..2d773c02 100755 --- a/mitmproxy +++ b/mitmproxy @@ -66,7 +66,7 @@ if __name__ == '__main__': print >> sys.stderr, "Error: mitmproxy requires a UTF console environment." print >> sys.stderr, "Set your LANG enviroment variable to something like en_US.UTF-8" sys.exit(1) - + m = console.ConsoleMaster(server, opts) try: diff --git a/release/contributors b/release/contributors new file mode 100755 index 00000000..a7518219 --- /dev/null +++ b/release/contributors @@ -0,0 +1,2 @@ +#!/bin/sh +git shortlog -n -s diff --git a/release/pyinstaller-mitmdump.spec b/release/pyinstaller-mitmdump.spec new file mode 100644 index 00000000..a1a9b937 --- /dev/null +++ b/release/pyinstaller-mitmdump.spec @@ -0,0 +1,20 @@ +# -*- mode: python -*- + +# Copy into the pyinstaller directory +# ./pyinstaller.py --clean -F ./pyinstaller-mitmdump.spec + +a = Analysis(['/Users/aldo/git/public/mitmproxy/mitmdump'], + hiddenimports=["pyamf"], + hookspath=None, + runtime_hooks=None) +pyz = PYZ(a.pure) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + name='mitmdump', + debug=False, + strip=None, + upx=True, + console=True ) diff --git a/release/pyinstaller-mitmproxy.spec b/release/pyinstaller-mitmproxy.spec new file mode 100644 index 00000000..8de6d583 --- /dev/null +++ b/release/pyinstaller-mitmproxy.spec @@ -0,0 +1,16 @@ +# -*- mode: python -*- +a = Analysis(['/Users/aldo/git/public/mitmproxy/mitmproxy'], + hiddenimports=["pyamf"], + hookspath=None, + runtime_hooks=None) +pyz = PYZ(a.pure) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + name='mitmproxy', + debug=False, + strip=None, + upx=True, + console=True ) diff --git a/scripts/contributors b/scripts/contributors deleted file mode 100755 index a7518219..00000000 --- a/scripts/contributors +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -git shortlog -n -s -- cgit v1.2.3