mirror of
https://github.com/andrewyng/openworker.git
synced 2026-08-30 22:53:41 +00:00
packaging: ship builtin persona bundles in the sidecar
collect_submodules only takes .py, so packaged builds had no builtin coworkers. Caught by inspecting the DMG — dev installs read them from the source tree.
This commit is contained in:
@@ -23,7 +23,7 @@ hides the window while keeping stdio intact.
|
||||
import os
|
||||
import sys
|
||||
|
||||
from PyInstaller.utils.hooks import collect_all, collect_submodules
|
||||
from PyInstaller.utils.hooks import collect_all, collect_data_files, collect_submodules
|
||||
|
||||
# SPECPATH is injected by PyInstaller and points at this file's directory
|
||||
# (<repo>/packaging). Derive everything else from it — no hardcoded paths.
|
||||
@@ -44,6 +44,14 @@ binaries = []
|
||||
for pkg in ("coworker", "aisuite", "mcp", "ddgs", "croniter", "docstring_parser"):
|
||||
hiddenimports += collect_submodules(pkg)
|
||||
|
||||
# Builtin personas ship as DATA, not code: personas/builtin/<id>/manifest.md plus their
|
||||
# skills/<name>/SKILL.md. collect_submodules only takes .py files, so without this the
|
||||
# packaged sidecar starts with NO builtin coworkers — the picker comes up empty and every
|
||||
# persona-scoped skill silently disappears. (pyproject's package-data covers pip installs;
|
||||
# PyInstaller needs its own instruction.) Keep this even if the persona set changes — it
|
||||
# collects whatever non-.py files the package carries.
|
||||
datas += collect_data_files("coworker")
|
||||
|
||||
if not INCLUDE_EXPERIMENTAL:
|
||||
hiddenimports = [
|
||||
m for m in hiddenimports if not m.startswith("coworker.connectors.experimental")
|
||||
|
||||
Reference in New Issue
Block a user