Skip to content

Fix deprecated warning when building the package#5494

Merged
georgesittas merged 1 commit intotobymao:mainfrom
loonies:build-license-fix
Jul 29, 2025
Merged

Fix deprecated warning when building the package#5494
georgesittas merged 1 commit intotobymao:mainfrom
loonies:build-license-fix

Conversation

@loonies
Copy link
Contributor

@loonies loonies commented Jul 28, 2025

Description

AUR package maintainer here.

When building the package we get this warning

--- SNIP ---
/usr/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.                                                                                         
        ********************************************************************************                                                                                                       
                                                                                                                                                                                               
!!
--- SNIP ---

This PR fixes deprecated license specification format in pyproject.toml.

The change should be backward compatible as per specification:

The legacy deprecated Core Metadata License field, license key table subkeys (text and file) in the pyproject.toml [project] table and license classifiers retain backwards compatibility. A removal is left to a future PEP and a new version of the Core Metadata specification.

https://peps.python.org/pep-0639/#backwards-compatibility

PEP 639 introduced the new license specification format and deprecated
the old one from PEP 621 which raises a warning when building the
package.

References:
- https://peps.python.org/pep-0639/
- https://peps.python.org/pep-0621/#license
@georgesittas georgesittas requested a review from tobymao July 28, 2025 17:57
@georgesittas
Copy link
Collaborator

Thank you :)

FYI @tobymao about getting this in.

@georgesittas georgesittas merged commit 18b7d0f into tobymao:main Jul 29, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants