Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ version = "0.1.0"
description = "Python SDK for GitHub Copilot CLI"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
license = "MIT"
# license-files is set by scripts/build-wheels.mjs for bundled CLI wheels
authors = [
{name = "GitHub", email = "opensource@github.com"}
]
classifiers = [
"Development Status :: 3 - Alpha",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down
11 changes: 7 additions & 4 deletions python/scripts/build-wheels.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -180,13 +180,13 @@ async function buildWheel(platform, pkgVersion, cliVersion, outputDir, licensePa
// Create __init__.py
writeFileSync(join(binDir, "__init__.py"), '"""Bundled Copilot CLI binary."""\n');

// Copy and modify pyproject.toml - replace license reference with file
// Copy and modify pyproject.toml for bundled CLI wheel
let pyprojectContent = readFileSync(join(pythonDir, "pyproject.toml"), "utf-8");

// Replace the license specification with file reference
// Update SPDX expression and add license-files for both SDK and bundled CLI licenses
pyprojectContent = pyprojectContent.replace(
'license = {text = "MIT"}',
'license = {file = "CLI-LICENSE.md"}'
'license = "MIT"',
'license = "MIT AND LicenseRef-Copilot-CLI"\nlicense-files = ["LICENSE", "CLI-LICENSE.md"]'
);

// Add package-data configuration
Expand All @@ -202,6 +202,9 @@ async function buildWheel(platform, pkgVersion, cliVersion, outputDir, licensePa
cpSync(join(pythonDir, "README.md"), join(buildDir, "README.md"));
}

// Copy SDK LICENSE
cpSync(join(repoRoot, "LICENSE"), join(buildDir, "LICENSE"));

// Copy CLI LICENSE
cpSync(licensePath, join(buildDir, "CLI-LICENSE.md"));

Expand Down
Loading