-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[uv_build] Emit warning when both license (PEP639) and legacy license classifiers are present in pyproject.toml #16354
Copy link
Copy link
Closed
Labels
build-backendenhancementNew feature or improvement to existing functionalityNew feature or improvement to existing functionality
Description
Summary
Currently, if the build-backend package is uv_build it will without error / warning build a package with pyproject.toml contains:
license = "Apache-2.0"
license-files = ["LICENSE"]
classifiers = [
"License :: OSI Approved :: Apache Software License",
]All classifiers that begin with License :: are deprecated.
Also, the legacy form
license = { file = "LICENSE" }is deprecated by PEP639 and replaced with the simplified SPDX expression form:
license = "Apache-2.0"
license-files = ["LICENSE"]Example
[build-system]
requires = ["uv_build>=0.9.3,<0.10.0"]
build-backend = "uv_build"
[project]
name = "test"
version = "0.1.0"
readme = "README.md"
# license = { file = "LICENSE" } # <== Legacy specification (https://packaging.python.org/en/latest/specifications/pyproject-toml/#legacy-specification)
license = "Apache-2.0"
license-files = ["LICENSE"]
requires-python = ">=3.11"
dependencies = []
classifiers = [
"License :: OSI Approved :: Apache Software License",
]
# ^^^^
# https://packaging.python.org/en/latest/specifications/pyproject-toml/#classifiersFor example, setuptools simply does not build the package if this situation happens
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
build-backendenhancementNew feature or improvement to existing functionalityNew feature or improvement to existing functionality