# 错误：文件 'pyproject.toml' 未定义 'build-system.requires' 表。

- **ID:** `python/setuptools-pyproject-missing-build-system`
- **领域:** python
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

存在 pyproject.toml 但缺少 [build-system] 部分，因此 pip 无法确定构建后端。这通常发生在工具写入不完整的 pyproject.toml 时。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## 解决方案

1. **** (90% 成功率)
   ```
   [build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"
   ```
2. **** (75% 成功率)
   ```
   pip install build
python -m build --sdist  # validates pyproject.toml
   ```

## 无效尝试

- **** — Disabling isolation doesn't supply the missing build-system table; pip still refuses to proceed. (85% 失败率)
- **** — Removing the file forces legacy setup.py behavior, which may not exist for a PEP 517-only project. (60% 失败率)
