Skip to content

Conversation

@bgilbert
Copy link
Member

Add SPDX license expression and license file paths to Python metadata per PEP 639. Include only the enabled projects in the SPDX expression for wheels, and all projects in the expression for the sdist. Add the licenses directory to the sdist, add the top-level COPYING.LESSER to the wheels (it governs __init__.py, so this is a bugfix), reparent the licenses directory within the wheel dist-info to match PEP 639, and bump the core metadata version to 2.4. Drop the legacy license field and deprecated license Trove classifier.

This should be a backward-compatible change, since the code installing a wheel doesn't need to understand the license fields and it's conventional to accept wheel metadata with an unrecognized minor version.

@openslide-bot
Copy link
Member

openslide-bot commented Apr 27, 2025

DCO signed off ✔️

All commits have been signed off. You have certified to the terms of the Developer Certificate of Origin, version 1.1. In particular, you certify that this contribution has not been developed using information obtained under a non-disclosure agreement or other license terms that forbid you from contributing it under the GNU Lesser General Public License, version 2.1.

@bgilbert
Copy link
Member Author

bgilbert commented Apr 27, 2025

The sdist's SPDX expression is:

LGPL-2.1-only AND blessing AND BSD-1-Clause AND BSD-2-Clause AND BSD-3-Clause AND (BSD-3-Clause OR GPL-2.0-only) AND BSD-3-Clause WITH PCRE2-exception AND IJG AND LGPL-2.0-or-later AND (LGPL-2.1-only OR MPL-1.1) AND LGPL-2.1-or-later AND libpng-2.0 AND libtiff AND MIT AND Zlib

@bgilbert bgilbert force-pushed the licenses branch 2 times, most recently from 3100f23 to de5017f Compare April 29, 2025 07:14
bgilbert added 6 commits June 15, 2025 02:11
During sdist, Project.get_enabled() includes subprojects for all platforms
but omits dev deps if those are disabled.  We don't need to use
Project.get_all() and then filter out omitted dev deps afterward.

Signed-off-by: Benjamin Gilbert <[email protected]>
When we add SPDX expressions, it'll be useful to have a clearer name.

Signed-off-by: Benjamin Gilbert <[email protected]>
The SPDX license expression won't be available at configure time because
we won't know yet which dependencies are in the bdist.  Move generation
of the wheel's pyproject.toml to build time and keep the code in one place.

Signed-off-by: Benjamin Gilbert <[email protected]>
The SPDX expression for the wheel includes projects used on this platform,
and for the sdist, projects used on any platform.

Drop the legacy License field and deprecated license classifier.

Bump builder APIs for license-expression dependency.

Signed-off-by: Benjamin Gilbert <[email protected]>
PEP 639 wants us to do this.

Move the proj.display part of the path calculation into
write_license_files() to avoid repeating ourselves.

Signed-off-by: Benjamin Gilbert <[email protected]>
To follow the source layout required by PEP 639, we need to move the
licenses directory within the wheel to *.dist-info/licenses/licenses.
We also need to add COPYING.LESSER, since it's included in the sdist.
(This is a bugfix in any case, since that license governs the artifacts
in artifacts/python.)

Signed-off-by: Benjamin Gilbert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants