-
Notifications
You must be signed in to change notification settings - Fork 72
Description
setuptools
raises an error with the example pyproject.toml
, copying from the tutorial, when I run pip install -e .
:
setuptools.errors.InvalidConfigError: License classifiers have been superseded
by license expressions (see https://peps.python.org/pep-0639/). Please remove:
License :: OSI Approved :: MIT License
This is triggered by the combination of license = "MIT"
and the License :: OSI Approved :: MIT License
entry in classifiers
. I currently have setuptools v80.9.0, but this may be raised by v77.0.0 onwards. Removing the license classifier avoids the error.
For background - here's the updated bit of the packaging spec:
The use of License :: classifiers is deprecated and tools MAY issue a warning informing users about that. Build tools MAY raise an error if both the license string value (translating to License-Expression metadata field) and the License :: classifiers are used.
https://packaging.python.org/en/latest/specifications/pyproject-toml/#classifiers
This said, hatch(ling) is quite happy with the classifier and once the build system is specified, pip install -e .
runs fine, after adding this block to the pyproject.toml
to specify hatchling rather than setuptools:
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
For reference, here are the uses of License ::
classifiers in the guide.
On balance, would it be preferred to remove the references to licence classifiers from this guide?