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)
This commit is contained in:
+4
-2
@@ -23,8 +23,10 @@ try:
|
||||
import mcp.server.stdio
|
||||
import mcp.types as types
|
||||
from mcp.server import Server
|
||||
except ImportError:
|
||||
print("ERROR: mcp package not installed. Run: pip install mcp", file=sys.stderr)
|
||||
except ImportError as e:
|
||||
print(f"ERROR: Failed to import MCP package: {e}", file=sys.stderr)
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
sys.exit(1)
|
||||
|
||||
# Config/ROOT_DIR resolution (priority order):
|
||||
|
||||
Reference in New Issue
Block a user