Skip to content

deprecated field format for license in pyproject.toml #121

@stexandev

Description

@stexandev

Describe the bug
Writing a license to a pyproject.toml creates the entry in a deprecated format.

To Reproduce
Update the license field in a pyproject.toml with somesy and then build your package with python -m build.

Expected behavior
It should create an entry with a simple string.

Traces

* Building sdist...
/tmp/build-env-1ywb0epn/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.
        ********************************************************************************

!!

Environment

  • python==3.13.5
  • somesy==0.7.3
  • build==1.2.2.post1

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions