fix(build): stop stripping zeroconf/_services + add import smoke test
Lint & Test / test (push) Successful in 2m39s
Lint & Test / test (push) Successful in 2m39s
- build-common.sh: remove zeroconf/_services from the strip list. zeroconf's compiled Cython _listener.pyd imports from _services internally, so stripping it broke `import zeroconf` at runtime with ModuleNotFoundError — same class of bug as the numpy.linalg strip. - build-common.sh: add smoke_test_imports() that imports every top-level dependency against the stripped site-packages. Catches "we stripped something that was actually needed" regressions at build time instead of on a user's machine after install. - build-dist.sh: wire smoke test into the Linux flow (runs real imports). - build-dist-windows.sh: cross-build can't load win_amd64 .pyd files with the host python, so instead verify that the known-required submodule dirs (numpy.linalg/lib/matrixlib/ma, zeroconf._services) exist after cleanup. Fails loud if any future strip-rule removes them.
This commit is contained in:
@@ -56,6 +56,9 @@ cleanup_site_packages "$SITE_PACKAGES" "so" "so"
|
||||
# Pre-compile and strip .py sources (must happen AFTER cleanup)
|
||||
compile_and_strip_sources "$SITE_PACKAGES" "python"
|
||||
|
||||
# Fail loud if cleanup broke any required import
|
||||
smoke_test_imports "$SITE_PACKAGES" "python"
|
||||
|
||||
# ── Build frontend ───────────────────────────────────────────
|
||||
|
||||
echo "[4/7] Building frontend..."
|
||||
|
||||
Reference in New Issue
Block a user