diff --git a/MANIFEST.in b/MANIFEST.in index f18533a37..b68af9a62 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,9 +1,8 @@ -include mitmproxy mitmdump -include LICENSE CHANGELOG CONTRIBUTORS README.rst -recursive-include examples * -recursive-include doc * -recursive-include test * -recursive-include libmproxy * +include mitmproxy mitmdump mitmweb +include LICENSE CHANGELOG CONTRIBUTORS CONTRIBUTING.md README.rst +graft examples +graft doc +graft test +prune test/tools +graft libmproxy recursive-exclude * *.pyc *.pyo *.swo *.swp -recursive-exclude netlib * -recursive-exclude libpathod * diff --git a/release/mitmdump.spec b/release/mitmdump.spec index e3a6905d9..c3b5ecd04 100644 --- a/release/mitmdump.spec +++ b/release/mitmdump.spec @@ -1,31 +1,15 @@ # -*- mode: python -*- -from glob import glob +from PyInstaller.utils.hooks import collect_data_files -VENV = "../release/venv" - -a = Analysis(['../../mitmproxy/mitmdump'], +a = Analysis(['../mitmdump'], + binaries=None, + datas=collect_data_files("libmproxy.onboarding"), hiddenimports=[], hookspath=None, runtime_hooks=None, - excludes=None, - ) -a.datas = Tree( - "../mitmproxy/libmproxy/onboarding/templates", - prefix="libmproxy/onboarding/templates" -) -a.datas += Tree( - "../mitmproxy/libmproxy/onboarding/static", - prefix="libmproxy/onboarding/static" -) -a.datas += Tree( - os.path.join( - VENV, - "lib/python2.7/site-packages/certifi", - ), - prefix = "certifi" -) -pyz = PYZ(a.pure) + excludes=None) +pyz = PYZ(a.pure, a.zipped_data) exe = EXE(pyz, a.scripts, a.binaries, diff --git a/release/mitmproxy.spec b/release/mitmproxy.spec index 1f0a515bb..2666828ab 100644 --- a/release/mitmproxy.spec +++ b/release/mitmproxy.spec @@ -1,31 +1,15 @@ # -*- mode: python -*- -import os.path -from glob import glob -VENV = "../release/venv" +from PyInstaller.utils.hooks import collect_data_files -a = Analysis(['../../mitmproxy/mitmproxy'], +a = Analysis(['../mitmproxy'], + binaries=None, + datas=collect_data_files("libmproxy.onboarding"), hiddenimports=[], hookspath=None, runtime_hooks=None, - excludes=None, - ) -a.datas = Tree( - "../mitmproxy/libmproxy/onboarding/templates", - prefix="libmproxy/onboarding/templates" -) -a.datas += Tree( - "../mitmproxy/libmproxy/onboarding/static", - prefix="libmproxy/onboarding/static" -) -a.datas += Tree( - os.path.join( - VENV, - "lib/python2.7/site-packages/certifi", - ), - prefix = "certifi" -) -pyz = PYZ(a.pure) + excludes=None) +pyz = PYZ(a.pure, a.zipped_data) exe = EXE(pyz, a.scripts, a.binaries, diff --git a/release/mitmweb.spec b/release/mitmweb.spec new file mode 100644 index 000000000..e1fea1a33 --- /dev/null +++ b/release/mitmweb.spec @@ -0,0 +1,22 @@ +# -*- mode: python -*- + +from PyInstaller.utils.hooks import collect_data_files + +a = Analysis(['../mitmweb'], + binaries=None, + datas=collect_data_files("libmproxy"), + hiddenimports=[], + hookspath=None, + runtime_hooks=None, + excludes=None) +pyz = PYZ(a.pure, a.zipped_data) +exe = EXE(pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + name='mitmweb', + debug=False, + strip=None, + upx=True, + console=True ) diff --git a/release/mitmweb.spec.disabled b/release/mitmweb.spec.disabled deleted file mode 100644 index 21ae28900..000000000 --- a/release/mitmweb.spec.disabled +++ /dev/null @@ -1,46 +0,0 @@ -# -*- mode: python -*- - -from glob import glob - -VENV = "../release/venv" - -a = Analysis(['../mitmproxy/mitmweb'], - hiddenimports=[], - hookspath=None, - runtime_hooks=None, - excludes=None, - ) -a.datas = Tree( - "../mitmproxy/libmproxy/onboarding/templates", - prefix="libmproxy/onboarding/templates" -) -a.datas += Tree( - "../mitmproxy/libmproxy/onboarding/static", - prefix="libmproxy/onboarding/static" -) -a.datas += Tree( - "../mitmproxy/libmproxy/web/templates", - prefix="libmproxy/web/templates" -) -a.datas += Tree( - "../mitmproxy/libmproxy/web/static", - prefix="libmproxy/web/static" -) -a.datas += Tree( - os.path.join( - VENV, - "lib/python2.7/site-packages/certifi", - ), - prefix = "certifi" -) -pyz = PYZ(a.pure) -exe = EXE(pyz, - a.scripts, - a.binaries, - a.zipfiles, - a.datas, - name='mitmweb', - debug=False, - strip=None, - upx=True, - console=True ) diff --git a/setup.py b/setup.py index f20e26693..34c7607b3 100644 --- a/setup.py +++ b/setup.py @@ -34,7 +34,7 @@ scripts = { "urwid~=1.3.1", }, "mitmdump": { - "click~=5.1", + "click~=6.2", }, "mitmweb": set() }