According to the documentation, thelicense field in pyproject.toml should be a SPDX license expression, and it's the license-files field that should contain paths to the license files.
In your case it should be:
[project]
license = "BSD-2-Clause"
license-files = ["LICENSE"]
According to the documentation, the
licensefield inpyproject.tomlshould be a SPDX license expression, and it's thelicense-filesfield that should contain paths to the license files.In your case it should be: