-
Notifications
You must be signed in to change notification settings - Fork 29
Add PEP 639 license info to Python metadata #353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
bgilbert
wants to merge
6
commits into
openslide:main
Choose a base branch
from
bgilbert:licenses
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
|
The sdist's SPDX expression is: |
3100f23 to
de5017f
Compare
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
licensesdirectory to the sdist, add the top-levelCOPYING.LESSERto the wheels (it governs__init__.py, so this is a bugfix), reparent thelicensesdirectory within the wheeldist-infoto 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.