excom-ai-demo / sitecustomize.py
Peter Larnholt
Add sitecustomize.py to patch pyairports module globally
5130472
raw
history blame
507 Bytes
"""
Sitecustomize to patch pyairports module before any imports.
This runs automatically for all Python processes.
"""
import sys
from types import ModuleType
# Create fake pyairports module to satisfy outlines import
# vLLM 0.5.5 imports outlines even when VLLM_USE_OUTLINES=0
pyairports = ModuleType('pyairports')
pyairports.airports = ModuleType('pyairports.airports')
pyairports.airports.AIRPORT_LIST = []
sys.modules['pyairports'] = pyairports
sys.modules['pyairports.airports'] = pyairports.airports