mirror of
https://github.com/got-feedBack/feedBack-desktop.git
synced 2026-08-11 03:09:56 +00:00
fix(bundle): copy all top-level core python packages (routers/ etc.)
core#834 extracted routes into a new top-level routers/ package; the bundle script only copied lib/, so the packaged backend would die with ModuleNotFoundError: No module named 'routers'. Copy every top-level package (dir with __init__.py) except plugins/ (bundled selectively below) and tests/ (never ships), so the ongoing R3 extraction series can't keep breaking packaged builds. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Fable 5
parent
add4facb85
commit
09617aa417
@@ -53,8 +53,20 @@ mkdir -p "$BUNDLE_DIR/static" "$BUNDLE_DIR/plugins"
|
||||
# packaged backend with ModuleNotFoundError on startup.
|
||||
cp "$SLOPSMITH_DIR"/*.py "$BUNDLE_DIR/"
|
||||
cp "$SLOPSMITH_DIR/VERSION" "$BUNDLE_DIR/"
|
||||
# Copy every top-level python package (dir with __init__.py), not a hardcoded
|
||||
# list — core's R3 refactor keeps adding packages (routers/ in core#834, lib
|
||||
# extractions in #830/#831) and each miss ships a backend that dies on import.
|
||||
# plugins/ is bundled selectively further down; tests/ must never ship.
|
||||
for pkg in "$SLOPSMITH_DIR"/*/__init__.py; do
|
||||
[ -f "$pkg" ] || continue
|
||||
pkg_dir="$(dirname "$pkg")"
|
||||
case "$(basename "$pkg_dir")" in
|
||||
plugins|tests) continue ;;
|
||||
esac
|
||||
cp -r "$pkg_dir" "$BUNDLE_DIR/"
|
||||
done
|
||||
cp -r "$SLOPSMITH_DIR/lib" "$BUNDLE_DIR/"
|
||||
rm -rf "$BUNDLE_DIR/lib/__pycache__"
|
||||
find "$BUNDLE_DIR" -type d -name '__pycache__' -prune -exec rm -rf {} +
|
||||
|
||||
# Bundled content (progression paths, quests, shop definitions)
|
||||
[ -d "$SLOPSMITH_DIR/data" ] && cp -r "$SLOPSMITH_DIR/data" "$BUNDLE_DIR/"
|
||||
|
||||
Reference in New Issue
Block a user