glowpath/backend/hooks/hook-open_webui.py
I. A. Naval 3218c10063
Add bundled open-webui
Use pyinstaller to compile to a single bundle
2025-06-28 15:09:35 -04:00

34 lines
841 B
Python

"""
PyInstaller hook for open-webui package.
This hook ensures all necessary files and modules are included in the bundle.
"""
from PyInstaller.utils.hooks import (
collect_data_files,
collect_submodules,
collect_dynamic_libs,
)
# Collect all submodules
hiddenimports = collect_submodules("open_webui")
# Collect data files (templates, static files, etc.)
datas = collect_data_files("open_webui")
# Collect any dynamic libraries
binaries = collect_dynamic_libs("open_webui")
# Add specific hidden imports that might be missed
hiddenimports += [
"open_webui.main",
"open_webui.apps",
"open_webui.config",
"open_webui.constants",
"open_webui.utils",
"open_webui.models",
"uvicorn.protocols.http.auto",
"uvicorn.protocols.websockets.auto",
"uvicorn.lifespan.on",
"uvicorn.loops.auto",
]