Checklist before submitting an issue
Issue details
In the generated pyproject.toml, we currently specify:
[project]
license = {file = "LICENSE"}
This has been deprecated since PEP 639 has been accepted.
When building the package using uvx --from build pyproject-build --installer uv, this raises the following DeprecationWarning from setuptools:
/tmp/build-env-bjz_rxiz/lib/python3.13/site-packages/setuptools/config/_apply_pyprojecttoml.py:82: SetuptoolsDeprecationWarning: `project.license` as a TOML table is deprecated
!!
********************************************************************************
Please use a simple string containing a SPDX expression for `project.license`. You can also use `project.license-files`. (Both options available on setuptools>=77.0.0).
By 2026-Feb-18, you need to update your project and remove deprecated calls
or your builds will no longer be supported.
See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
********************************************************************************
Solution
license should map to the appropriate SPDX string for the selected license
- a new
license-files key should be added that points to the LICENSE file. The NOTICE file should probably also be included if it is present.
For example:
[project]
license = "Apache-2.0"
license-files = ["LICENSE", "NOTICE"]
Checklist before submitting an issue
Issue details
In the generated
pyproject.toml, we currently specify:This has been deprecated since PEP 639 has been accepted.
When building the package using
uvx --from build pyproject-build --installer uv, this raises the following DeprecationWarning from setuptools:Solution
licenseshould map to the appropriate SPDX string for the selected licenselicense-fileskey should be added that points to theLICENSEfile. TheNOTICEfile should probably also be included if it is present.For example: