Skip to content

dist: avoid Python packaging warnings#185

Merged
bmr-cymru merged 1 commit intomainfrom
bmr-pyproject-no-license
Apr 3, 2025
Merged

dist: avoid Python packaging warnings#185
bmr-cymru merged 1 commit intomainfrom
bmr-pyproject-no-license

Conversation

@bmr-cymru
Copy link
Copy Markdown
Contributor

@bmr-cymru bmr-cymru commented Apr 3, 2025

  ********************************************************************************
  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.
  ********************************************************************************

We can't use a simple string since that breaks downstream builds on distributions that do not yet support PEP639. For now switch to using license-files in pyproject.toml and setup.cfg.

See also #42

Referring to the discussion in pypa/packaging-problems#870 it's not recommended to set the 'license' or 'license-files' keys in the '[project]' table of pyproject.toml due to these problems.

Removing these keys from pyproject.toml, leaving the 'license' key in setup.cfg and adding 'dynamic = ["license"]' to '[project]' seem to do the right thing for the current GH build targets.

Resolves: #184

  ********************************************************************************
  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.
  ********************************************************************************

We can't use a simple string since that breaks downstream builds on
distributions that do not yet support PEP639. For now switch to using
license-files in pyproject.toml and setup.cfg.

See also #42

Referring to the discussion in pypa/packaging-problemd#870 it's not
recommended to set the 'license' or 'license-files' keys in the
'[project]' table of pyproject.toml due to these problems.

Removing these keys from pyproject.toml, leaving the 'license' key in
setup.cfg and adding 'dynamic = ["license"]' to '[project]' seem to do
the right thing for the current GH build targets.

Resolves: #184
@packit-as-a-service
Copy link
Copy Markdown

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/snapshotmanager-snapm-185
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@bmr-cymru bmr-cymru merged commit 46adc91 into main Apr 3, 2025
14 of 15 checks passed
@bmr-cymru bmr-cymru deleted the bmr-pyproject-no-license branch May 30, 2025 16:45
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.

Update python packaging license specification

1 participant