python
config_error
ai_generated
true
SetuptoolsDeprecationWarning: 'license-file' is deprecated; use 'license-files' with glob patterns instead.
ID: python/setuptools-license-file-deprecated
80%Fix Rate
84%Confidence
0Evidence
2025-01-08First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 3.x | active | — | — | — |
Root Cause
setuptools 77+ deprecates the singular license-file key in favor of license-files (a list supporting globs) to align with PEP 639.
generic中文
setuptools 77+ 弃用单数形式的 license-file 键,改用 license-files(支持 glob 的列表),以符合 PEP 639。
Workarounds
-
95% success
# pyproject.toml [project] license = "MIT" license-files = ["LICENSE*", "COPYING*"]
-
92% success
[project] license = "MIT" # or "Apache-2.0 OR MIT" license-files = ["LICENSE"]
Dead Ends
Common approaches that don't work:
-
70% fail
The key will be removed, breaking future builds.
-
80% fail
Blocks security updates and may conflict with other build requirements.