Skip to content

Preserve static License-File metadata from pyproject.toml - #5350

Open
wangyusheng1985 wants to merge 1 commit into
pypa:mainfrom
wangyusheng1985:contribution-4960
Open

wangyusheng1985 wants to merge 1 commit into
pypa:mainfrom
wangyusheng1985:contribution-4960

Conversation

@wangyusheng1985

Copy link
Copy Markdown

Fixes #4960.

When license-files is set in pyproject.toml or setup.cfg, glob expansion no longer drops the static marker. PKG-INFO therefore omits Dynamic: license-file for that case.

Default glob discovery still marks License-File as Dynamic.

Test plan

  • pytest setuptools/tests/test_core_metadata.py::TestPEP643 setuptools/tests/config/test_apply_pyprojecttoml.py::TestStaticConfig

Glob expansion of license-files previously replaced the parsed list
with a plain list, so PKG-INFO always marked License-File as Dynamic.
Keep the static marker when the field came from a config file.

Closes pypa#4960

Signed-off-by: yusheng.wang <yusheng.wang@chaitin.com>
@mergify

mergify Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@wangyusheng1985

Copy link
Copy Markdown
Author

@Mergifyio queue

@mergify

mergify Bot commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

queue

☑️ Command disallowed due to command restrictions in the Mergify configuration.

Details
  • sender-permission >= write

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Improvement] License-File is marked as dynamic even when it isn't

1 participant