feat: 添加多平台依赖支持

为不同平台提供特定的依赖 extras,解决 macOS x86_64 的依赖兼容性问题。

- 添加平台特定的 PDF 解析 extras:pdf-win, pdf-macos-intel, pdf-macos-arm, pdf-linux
- 添加平台特定的 Office 文档 extras:office-win, office-macos-intel, office-macos-arm, office-linux
- macOS x86_64 使用硬编码版本:docling==2.40.0, docling-parse==4.0.0
- 移除通用的 pdf 和 office extras,强制用户选择平台
- 更新 SKILL.md 添加详细的多平台依赖安装指南
- 更新 README.md 添加平台特定安装说明
- 在 .gitignore 中添加 uv.lock
- 删除现有的 uv.lock 文件
- 创建 multi-platform-dependencies 规范文档
This commit is contained in:
2026-03-09 10:49:53 +08:00
parent b2fb418a06
commit dfe6904f4c
7 changed files with 264 additions and 4875 deletions

View File

@@ -6,7 +6,11 @@
- 使用 uv 管理依赖,禁用主机 Python
- 依赖声明pyproject.toml
- 安装:uv sync
- 安装:根据平台选择对应的 extras详见 SKILL.md
- macOS x86_64 (Intel): `uv pip install -e ".[pdf-macos-intel]"`
- macOS arm64 (Apple Silicon): `uv pip install -e ".[pdf-macos-arm]"`
- Windows: `uv pip install -e ".[pdf-win]"`
- Linux: `uv pip install -e ".[pdf-linux]"`
## 项目结构
@@ -57,9 +61,12 @@ uv run mypy .
- 编码测试GBK、UTF-8 BOM 等)
- 一致性测试(验证不同 Reader 解析结果的一致性)
运行测试前确保已安装所有依赖:
运行测试前确保已安装所有依赖(根据你的平台选择对应的 extras
```bash
uv sync
# macOS x86_64 (Intel) 示例
uv pip install -e ".[office-macos-intel]"
# 其他平台请参考 SKILL.md 的"多平台依赖安装指南"
```
## 代码规范