python
config_error
ai_generated
true
错误:无法找到 setup.cfg 中 long_description_content_type 引用的文件 'README.md'
error: Cannot find file 'README.md' referenced by long_description_content_type in setup.cfg
ID: python/setuptools-sdist-missing-readme
80%修复率
83%置信度
0证据数
2024-09-03首次发现
版本兼容性
| 版本 | 状态 | 引入 | 弃用 | 备注 |
|---|---|---|---|---|
| 3.8 | active | — | — | — |
| 3.9 | active | — | — | — |
| 3.10 | active | — | — | — |
| 3.11 | active | — | — | — |
| 3.12 | active | — | — | — |
根因分析
元数据引用了不存在或名称不同的 README/长描述文件(Linux 上区分大小写),构建读取时失败。
English
Metadata refers to a README or long description file that is absent or named differently (case-sensitive on Linux), so the build fails when reading it.
解决方案
-
92% 成功率
Ensure the referenced file exists with exact case and is included in the sdist (e.g. add `include README.md` to MANIFEST.in).
-
88% 成功率
Use dynamic metadata in pyproject.toml: `[project] readme = "README.md"` and verify the path relative to the project root.
无效尝试
常见但无效的做法:
-
60% 失败
Case changes may not match the reference and break on case-sensitive filesystems.
-
50% 失败
Loses PyPI description; the underlying missing-file issue remains for other references.