Skip to content

python: migrate to PEP 639 license-files#456

Open
brettcannon wants to merge 2 commits intogithub:mainfrom
brettcannon:license
Open

python: migrate to PEP 639 license-files#456
brettcannon wants to merge 2 commits intogithub:mainfrom
brettcannon:license

Conversation

@brettcannon
Copy link

Migrate the Python SDK's license metadata to the modern PEP 639 format.

Changes

pyproject.toml

  • license = {text = "MIT"}license = "MIT" (SPDX expression string)
  • Removed deprecated License :: OSI Approved :: MIT License trove classifier

scripts/build-wheels.mjs

  • Updated license SPDX expression to MIT AND LicenseRef-Copilot-CLI for bundled CLI wheels
  • Added license-files = ["LICENSE", "CLI-LICENSE.md"] to include both SDK and CLI licenses
  • Copies the repo-root LICENSE into the build directory alongside the CLI license

Verification

  • uv build --wheel: produces wheel with License-Expression: MIT metadata
  • scripts/build-wheels.mjs: produces wheel containing both licenses/LICENSE and licenses/CLI-LICENSE.md with License-Expression: MIT AND LicenseRef-Copilot-CLI and corresponding License-File entries

- 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
@brettcannon brettcannon requested a review from a team as a code owner February 12, 2026 17:53
Copilot AI review requested due to automatic review settings February 12, 2026 17:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.toml to use PEP 639 format (license = "MIT" instead of license = {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-files metadata

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

Address review feedback: combine the SPDX expression and license-files
replacements into a single atomic operation to avoid fragile coupling.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

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.

2 participants