python: migrate to PEP 639 license-files#456
Open
brettcannon wants to merge 2 commits intogithub:mainfrom
Open
python: migrate to PEP 639 license-files#456brettcannon wants to merge 2 commits intogithub:mainfrom
brettcannon wants to merge 2 commits intogithub:mainfrom
Conversation
- Change license from deprecated table form to SPDX expression string - Remove deprecated License :: trove classifier - Update build-wheels.mjs to set license-files with both SDK LICENSE and CLI-LICENSE.md for bundled wheels - Update SPDX expression to 'MIT AND LicenseRef-Copilot-CLI' for bundled CLI wheels
Contributor
There was a problem hiding this comment.
Pull request overview
This PR migrates the Python SDK's license metadata to the modern PEP 639 format, replacing the deprecated dictionary-style license specification with a simple SPDX expression string. The changes ensure that both the base SDK wheels (MIT licensed) and the bundled CLI wheels (dual-licensed under MIT and the Copilot CLI license) properly declare their licenses according to current Python packaging standards.
Changes:
- Updated
pyproject.tomlto use PEP 639 format (license = "MIT"instead oflicense = {text = "MIT"}) and removed deprecated trove classifier - Modified wheel build script to generate dual-licensed metadata for bundled CLI wheels using SPDX expression
MIT AND LicenseRef-Copilot-CLI - Added logic to copy both SDK and CLI license files into bundled wheels with proper
license-filesmetadata
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| python/pyproject.toml | Migrated license field to PEP 639 SPDX string format and removed deprecated MIT license classifier |
| python/scripts/build-wheels.mjs | Updated wheel build logic to use dual-license SPDX expression, add license-files metadata, and copy both SDK and CLI licenses |
SteveSandersonMS
previously approved these changes
Feb 12, 2026
Address review feedback: combine the SPDX expression and license-files replacements into a single atomic operation to avoid fragile coupling.
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
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.
Migrate the Python SDK's license metadata to the modern PEP 639 format.
Changes
pyproject.tomllicense = {text = "MIT"}→license = "MIT"(SPDX expression string)License :: OSI Approved :: MIT Licensetrove classifierscripts/build-wheels.mjsMIT AND LicenseRef-Copilot-CLIfor bundled CLI wheelslicense-files = ["LICENSE", "CLI-LICENSE.md"]to include both SDK and CLI licensesLICENSEinto the build directory alongside the CLI licenseVerification
uv build --wheel: produces wheel withLicense-Expression: MITmetadatascripts/build-wheels.mjs: produces wheel containing bothlicenses/LICENSEandlicenses/CLI-LICENSE.mdwithLicense-Expression: MIT AND LicenseRef-Copilot-CLIand correspondingLicense-Fileentries