docs: require Python 3.10 for obfuscated lib; prefer Ubuntu 22.04

Reject 3.12+ in setup_env to avoid bad marshal data on new servers.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-18 12:15:21 +08:00
parent 1d2bdc3aa1
commit af0fbc3e6f
6 changed files with 53 additions and 15 deletions
+7 -3
View File
@@ -71,12 +71,16 @@ require_ubuntu() {
# shellcheck source=/dev/null
source /etc/os-release
if [[ "${ID:-}" != "ubuntu" ]]; then
log "警告: 当前系统为 ${ID:-unknown},官方仅测试 Ubuntu 22.04/24.04"
log "警告: 当前系统为 ${ID:-unknown},官方推荐 Ubuntu 22.04(Python 3.10)"
return 0
fi
local ver="${VERSION_ID:-}"
if [[ "${ver}" != "22.04" && "${ver}" != "24.04" ]]; then
log "警告: Ubuntu ${ver} 未在文档中明确测试,继续执行"
if [[ "${ver}" == "22.04" ]]; then
log "系统: Ubuntu 22.04(推荐)"
elif [[ "${ver}" == "24.04" ]]; then
log "警告: Ubuntu 24.04 默认 Python 3.12 与用户版加密 lib 不兼容;请确保已安装 python3.10"
else
log "警告: Ubuntu ${ver} 未在文档中明确测试,继续执行(推荐 22.04)"
fi
}