♻️ refactor: adopt PEP 639 license metadata#75
Merged
SigureMo merged 1 commit intoShigureLab:mainfrom Mar 16, 2026
Merged
Conversation
SigureMo
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
改动动机
当前
pyproject.toml仍使用旧式project.license = { text = ... },并保留License :: OSI Approved :: MIT Licenseclassifier。为迁移到 PEP 639 推荐的许可证元数据写法,本 PR 将其改为 SPDX license expression,并补充license-files。PEP 639 说明
PEP 639 建议使用 SPDX license expression 声明许可证,并通过
license-files声明随发行包分发的许可证文件;license classifier 不再是推荐的主要声明方式。参考:https://peps.python.org/pep-0639/
变更内容
project.license从{ text = "MIT" }改为"MIT"project.license-files = ["LICENSE"]License :: OSI Approved :: MIT Licenseclassifier验证结果
uvx --from 'validate-pyproject[all]' validate-pyproject pyproject.toml✅uv build✅