修复GitHub Actions中sharp包安装失败的Python依赖问题
- 添加Python 3.11环境设置以确保distutils可用 - 安装setuptools包提供必要的构建工具 - 解决macOS上node-gyp编译sharp时的模块缺失错误 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
10
.github/workflows/publish.yml
vendored
10
.github/workflows/publish.yml
vendored
@@ -45,6 +45,16 @@ jobs:
|
||||
node-version: lts/*
|
||||
cache: 'pnpm'
|
||||
|
||||
# 设置 Python 环境以解决 sharp 依赖问题
|
||||
- name: setup python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.11' # 使用 3.11 版本以确保 distutils 可用
|
||||
|
||||
# 安装 setuptools 以提供 distutils
|
||||
- name: install setuptools
|
||||
run: pip install setuptools
|
||||
|
||||
- name: install Rust stable
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user