Files
mt5-quant/hooks/hook-mcp.py
T
Devid HW 3cfd374160 Add PyInstaller build support for deployment
- Add PyInstaller spec files (onefile and onedir modes)
- Add build scripts for executable creation
- Add MCP hooks for PyInstaller compatibility
- Add test script for MCP server validation
- Add Windsurf integration setup guide
- Update main.py with better error reporting
- Successfully tested MCP server works with ONEDIR build (45MB)

Features:
- Single executable deployment without Python dependency
- ONEDIR mode preserves stdio communication for MCP
- Build scripts with deployment instructions
- Windsurf config integration guide

Files added:
- mt5-quant.spec (PyInstaller spec)
- mt5-quant-onedir.spec (directory mode)
- scripts/build-executable.sh (onefile)
- scripts/build-executable-onedir.sh (directory)
- hooks/hook-mcp.py (PyInstaller hook)
- test_mcp.py (validation script)
- WINDSURF_SETUP.md (integration guide)
2026-04-18 13:00:28 +07:00

19 lines
470 B
Python

# PyInstaller hook for mcp package
# Ensures all mcp submodules are included
from PyInstaller.utils.hooks import collect_submodules, collect_data_files
hiddenimports = collect_submodules('mcp')
datas = collect_data_files('mcp')
# Also ensure anyio dependencies are included
hiddenimports += [
'anyio',
'anyio.streams',
'anyio.streams.memory',
'anyio.streams.text',
'anyio._backends',
'anyio._backends._asyncio',
'anyio._backends._trio',
]