Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions newsfragments/4899.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Avoided eagerly raising an exception when ``license-files`` is defined
simultaneously inside and outside of ``pyproject.toml``.
Instead we rely on the existing deprecation error.
3 changes: 2 additions & 1 deletion setuptools/config/_apply_pyprojecttoml.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ def _apply_tool_table(dist: Distribution, config: dict, filename: StrPath):
return # short-circuit

if "license-files" in tool_table:
if dist.metadata.license_files:
if "license-files" in config.get("project", {}):
# https://github.com/pypa/setuptools/pull/4837#discussion_r2004983349
raise InvalidConfigError(
"'project.license-files' is defined already. "
"Remove 'tool.setuptools.license-files'."
Expand Down
Loading