-
fix(release): bundle stdlib platform.py so the binary smoke test passes (#3140)
发布于
2026-06-26 17:13:07 +00:00 | 1479 次提交 在此版本后已推送到 mainThe first-party
platform/package shadows the stdlibplatformmodule and
re-exports its API by loading the stdlib source at import time. In the
PyInstaller onefile build the stdlib is not laid out as loose.pyfiles, so
_load_stdlib_platform()raised ImportError and everyopensre --version
smoke test crashed — breaking the Release workflow on macOS, Linux, and Windows.Stage a copy of the genuine
platform.pyat build time and bundle it under
_opensre_stdlib_platform/, then load it fromsys._MEIPASSin frozen builds
(falling back to the sysconfig stdlib path for source checkouts). Add packaging
regression tests covering the loader and tying the workflow's bundled path to
the loader constant.Co-authored-by: Cursor cursoragent@cursor.com
Co-authored-by: copilot-swe-agent[bot] 198982749+Copilot@users.noreply.github.com下载附件