mitmproxy/release/specs/standalone.spec
Alexander Prinzhorn 14d5fa0474
Update PyInstaller spec to set the u (unbuffered) flag (#6821)
* Update PyInstaller spec to set the u (unbuffered) flag
* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-04-28 10:25:51 +02:00

31 lines
745 B
Python

# -*- mode: python ; coding: utf-8 -*-
for tool in ["mitmproxy", "mitmdump", "mitmweb"]:
excludes = []
if tool != "mitmweb":
excludes.append("mitmproxy.tools.web")
if tool != "mitmproxy":
excludes.append("mitmproxy.tools.console")
options = []
if tool == "mitmdump":
# https://github.com/mitmproxy/mitmproxy/issues/6757
options.append(("unbuffered", None, "OPTION"))
a = Analysis(
[tool],
excludes=excludes,
)
pyz = PYZ(a.pure, a.zipped_data)
EXE(
pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
options,
name=tool,
console=True,
icon="icon.ico",
)