File: windows-dir.spec

package info (click to toggle)
mitmproxy 8.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 38,844 kB
  • sloc: python: 53,317; javascript: 1,603; xml: 186; sh: 105; ansic: 68; makefile: 13
file content (39 lines) | stat: -rw-r--r-- 882 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from pathlib import Path

from PyInstaller.building.api import PYZ, EXE, COLLECT
from PyInstaller.building.build_main import Analysis

here = Path(r".")
tools = ["mitmproxy", "mitmdump", "mitmweb"]

analysis = Analysis(
    tools,
    excludes=["tcl", "tk", "tkinter"],
    pathex=[str(here)],
)

pyz = PYZ(analysis.pure, analysis.zipped_data)
executables = []
for tool in tools:
    executables.append(EXE(
        pyz,
        # analysis.scripts has all runtime hooks and all of our tools.
        # remove the other tools.
        [s for s in analysis.scripts if s[0] not in tools or s[0] == tool],
        [],
        exclude_binaries=True,
        name=tool,
        console=True,
        upx=False,
        icon='icon.ico'
    ))

COLLECT(
    *executables,
    analysis.binaries,
    analysis.zipfiles,
    analysis.datas,
    strip=False,
    upx=False,
    name="onedir"
)