Error building wheel due to license in pyproject.toml not following PEP 639

Author: jhamonCreated Mar 27, 2025Updated Mar 27, 2025

I see this when trying to install:

Building wheel for wordcloud (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for wordcloud (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [44 lines of output]
      /tmp/pip-build-env-ckk8qifs/overlay/lib/python3.12/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.
              ********************************************************************************
      
      !!

I think the actual cause of the failure in my case relates to gcc, but this warning message seems like something else that needs to be addressed for everyone.