发布

  • fix(release): bundle stdlib platform.py so the binary smoke test passes (#3140)

    frostbyte_neo 发布于 2026-06-26 17:13:07 +00:00 | 1479 次提交 在此版本后已推送到 main

    The first-party platform/ package shadows the stdlib platform module 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 .py files, so
    _load_stdlib_platform() raised ImportError and every opensre --version
    smoke test crashed — breaking the Release workflow on macOS, Linux, and Windows.

    Stage a copy of the genuine platform.py at build time and bundle it under
    _opensre_stdlib_platform/, then load it from sys._MEIPASS in 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

    下载附件