Files
TraderAI/TraderAI.Debug.spec

64 lines
1.5 KiB
RPMSpec

# -*- mode: python ; coding: utf-8 -*-
from PyInstaller.utils.hooks import collect_all
import sysconfig
from pathlib import Path
webview_datas, webview_binaries, webview_hiddenimports = collect_all("webview")
python_binaries = []
for dll_name in ("python3.dll", f"python{sysconfig.get_python_version().replace('.', '')}.dll"):
dll_path = Path(sysconfig.get_config_var("BINDIR") or "") / dll_name
if dll_path.exists():
python_binaries.append((str(dll_path), "."))
a = Analysis(
["traderai\\desktop.py"],
pathex=[],
binaries=[*webview_binaries, *python_binaries],
datas=[("web", "web"), *webview_datas],
hiddenimports=[
*webview_hiddenimports,
"uvicorn.logging",
"uvicorn.loops",
"uvicorn.loops.auto",
"uvicorn.protocols",
"uvicorn.protocols.http",
"uvicorn.protocols.http.auto",
"uvicorn.protocols.websockets",
"uvicorn.protocols.websockets.auto",
"uvicorn.lifespan",
"uvicorn.lifespan.on",
],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name="TraderAI.Debug",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
icon="web\\art\\LBC_Logo.ico",
codesign_identity=None,
entitlements_file=None,
)