Skip to content

♻️ refactor: adopt PEP 639 license metadata#75

Merged
SigureMo merged 1 commit intoShigureLab:mainfrom
ShigureNyako:refactor/adopt-pep-639-license-metadata
Mar 16, 2026
Merged

♻️ refactor: adopt PEP 639 license metadata#75
SigureMo merged 1 commit intoShigureLab:mainfrom
ShigureNyako:refactor/adopt-pep-639-license-metadata

Conversation

@ShigureNyako
Copy link
Member

改动动机

当前 pyproject.toml 仍使用旧式 project.license = { text = ... },并保留 License :: OSI Approved :: MIT License classifier。为迁移到 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 License classifier

验证结果

  • uvx --from 'validate-pyproject[all]' validate-pyproject pyproject.toml
  • uv build

@SigureMo SigureMo added this pull request to the merge queue Mar 16, 2026
Merged via the queue into ShigureLab:main with commit 008a6f3 Mar 16, 2026
6 checks passed
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.

2 participants