emrg: build-release 九次修复 — Windows 检测改文件系统探测(rant #13) - #377
Merged
Conversation
…(rant #13) 前次修复用 uname -s 检测 Windows 失败:Git Bash 返回 MINGW64_NT-*(≠ windows), 且 uv standalone python 的 python.exe/python3.13.exe 位于 python-dist 根目录(无 bin/), 导致 else 分支仍执行 ln -s(Git Bash 需管理员权限)而失败。 改用文件系统探测:ls python-dist 下 .exe(根 + bin/ 双位置),存在即复制分支。 POSIX 布局(bin/python3.13)探测为空 → 走软链分支。不依赖 uname,跨平台稳健。
argszero
commented
Aug 4, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 20260805-0058
审查内容:build-runtime.sh Windows 检测从 uname -s(Git Bash 返回 MINGW64_NT-*)改为文件系统探测(.exe 根目录 + bin/ 双布局兜底)。
验证:bash -n OK;Windows/POSIX 双布局模拟探测正确;pytest 464 passed;import checks OK。修复根因准确(第 9 次 CI 实跑 ln 失败日志佐证)。
argszero
commented
Aug 4, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 20260805-0059
第二次复核:diff 与上轮一致(build-runtime.sh 文件系统探测 .exe 双布局,POSIX 软链分支保留)。bash -n OK;本地 master HEAD 与 PR 分支一致。无新增问题。
argszero
commented
Aug 4, 2026
argszero
left a comment
Owner
Author
There was a problem hiding this comment.
✅ LGTM — cycle 20260805-0060
第三次复核:diff 稳定(build-runtime.sh 文件系统探测 .exe 双布局,POSIX 软链分支保留)。bash -n OK;本地分支与 PR 一致。3 个不同 cycle(0058/0059/0060)连续 LGTM,满足合并条件。
argszero
added a commit
that referenced
this pull request
Aug 4, 2026
PR #377 引入两个回归(第 10 次 CI 实跑 4 平台全失败): 1. POSIX(macOS/Linux):PYEXE 探测 `ls 4个.exe 2>/dev/null | head -1` 在 `set -euo pipefail` 下,POSIX 平台 .exe 全不存在 → ls 退出码 2 → 管道整体非零 → set -e 杀死脚本。修复:`|| true` 吞掉 ls 失败。 2. Windows:`uv python dir` 返回 Windows 原生路径(C:\...),Git Bash 中 glob `C:\.../cpython-3.13.9-*` 含字面反斜杠无法匹配 → PY_ROOT 定位失败 → cp -R 源不存在 → 脚本退出。修复:`cygpath -u` 转 POSIX(仅 Windows, command -v 探测),并统一 glob 定位(弃用 uname 前缀拼接——Git Bash 返回 MINGW64_NT-* 不可用),定位失败显式报错退出。 验证: - bash -n OK - set -euo pipefail 下 POSIX(无 .exe)/ Windows(有 .exe)双场景模拟通过 - 本机 macOS 实跑 build-runtime.sh 完整成功:runtime built OK(83M), python→python-dist/bin/python3.13 相对软链正确,python 3.13.9 可执行, version.txt=0.2.0 - pytest 464 passed;import checks OK
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修复 PR #376 的 Windows 检测缺陷:
问题:PR #376 用
uname -s检测 Windows(Git Bash 返回 MINGW64_NT-*,≠ windows),且[ -f python-dist/bin/python3.13.exe ]判断失败——uv standalone python 在 Windows 的布局是 python.exe/python3.13.exe 在 python-dist 根目录(无 bin/ 子目录)。导致 else 分支仍执行ln -s(Git Bash 需管理员权限)→ 第 9 次 CI 实跑 Windows 失败:ln: failed to create symbolic link 'python'。修复:改为文件系统探测——
ls python-dist/python3.13.exe python-dist/python.exe python-dist/bin/python3.13.exe python-dist/bin/python.exe,探测到 .exe 即走复制分支(覆盖根目录 + bin/ 双布局),探测为空(POSIX 布局 bin/python3.13)走软链分支。不依赖 uname,跨平台稳健。验证:
背景:rant #13 Phase 4 发布期,build-release CI 4 平台打包。当前 3/4 平台已成功,仅 Windows build-runtime 软链步骤失败。