From add4facb85d64f79e4a5dc951a75d70951ce60fd Mon Sep 17 00:00:00 2001 From: OmikronApex Date: Fri, 10 Jul 2026 16:22:05 +0200 Subject: [PATCH] fix(bundle): copy all top-level core .py modules, not just server.py Core added appstate.py (core#833); bundle-slopsmith.sh's whitelist only copied server.py, so packaged builds crashed on startup with ModuleNotFoundError: No module named 'appstate'. Glob top-level *.py so future sibling modules can't repeat this. Co-Authored-By: Claude Fable 5 --- scripts/bundle-slopsmith.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/bundle-slopsmith.sh b/scripts/bundle-slopsmith.sh index 97b8887..e383528 100755 --- a/scripts/bundle-slopsmith.sh +++ b/scripts/bundle-slopsmith.sh @@ -47,8 +47,11 @@ echo " Source: $SLOPSMITH_DIR" rm -rf "$BUNDLE_DIR" mkdir -p "$BUNDLE_DIR/static" "$BUNDLE_DIR/plugins" -# Server + lib -cp "$SLOPSMITH_DIR/server.py" "$BUNDLE_DIR/" +# Server + lib. Copy ALL top-level .py modules, not just server.py — core +# grows sibling modules (e.g. appstate.py, added in core#833) and a stale +# whitelist here ships a server.py whose imports are missing, crashing the +# packaged backend with ModuleNotFoundError on startup. +cp "$SLOPSMITH_DIR"/*.py "$BUNDLE_DIR/" cp "$SLOPSMITH_DIR/VERSION" "$BUNDLE_DIR/" cp -r "$SLOPSMITH_DIR/lib" "$BUNDLE_DIR/" rm -rf "$BUNDLE_DIR/lib/__pycache__"