Fix Windows build: Add FastAPI and dependencies to hiddenimports

Fixed PyInstaller build error on Windows:
"ModuleNotFoundError: No module named 'fastapi'"

Added to hiddenimports:
- FastAPI and its core modules
- Starlette (FastAPI framework base)
- Pydantic (data validation)
- anyio, sniffio (async libraries)
- h11, websockets (protocol implementations)
- requests and dependencies (for server sync client)

This ensures all web server dependencies are bundled in the executable.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-26 10:34:11 -08:00
parent 2c341e8cea
commit 0ee3f1003e

View File

@@ -37,7 +37,25 @@ a = Analysis(
'scipy', 'scipy',
'scipy.signal', 'scipy.signal',
'numpy', 'numpy',
# FastAPI and dependencies
'fastapi', 'fastapi',
'fastapi.routing',
'fastapi.responses',
'starlette',
'starlette.applications',
'starlette.routing',
'starlette.responses',
'starlette.websockets',
'starlette.middleware',
'starlette.middleware.cors',
'pydantic',
'pydantic.fields',
'pydantic.main',
'anyio',
'anyio._backends',
'anyio._backends._asyncio',
'sniffio',
# Uvicorn and dependencies
'uvicorn', 'uvicorn',
'uvicorn.logging', 'uvicorn.logging',
'uvicorn.loops', 'uvicorn.loops',
@@ -45,10 +63,21 @@ a = Analysis(
'uvicorn.protocols', 'uvicorn.protocols',
'uvicorn.protocols.http', 'uvicorn.protocols.http',
'uvicorn.protocols.http.auto', 'uvicorn.protocols.http.auto',
'uvicorn.protocols.http.h11_impl',
'uvicorn.protocols.websockets', 'uvicorn.protocols.websockets',
'uvicorn.protocols.websockets.auto', 'uvicorn.protocols.websockets.auto',
'uvicorn.protocols.websockets.wsproto_impl',
'uvicorn.lifespan', 'uvicorn.lifespan',
'uvicorn.lifespan.on', 'uvicorn.lifespan.on',
'h11',
'websockets',
'websockets.legacy',
'websockets.legacy.server',
# Requests (for server sync)
'requests',
'urllib3',
'certifi',
'charset_normalizer',
], ],
hookspath=[], hookspath=[],
hooksconfig={}, hooksconfig={},