Repository navigation
fix: declare the Apache-2.0 license in package metadata - #954
Open
sangkyoonnam wants to merge 1 commit into
Open
sangkyoonnam wants to merge 1 commit into
sangkyoonnam wants to merge 1 commit into
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
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.
The wheel's METADATA has no license declaration today, which is item 3 of #901. This adds
license = "Apache-2.0", so the wheel and sdist now carryLicense-Expression: Apache-2.0.Changes
pyproject.toml: addlicense = "Apache-2.0"next to the existinglicense-files.flit_core >=3.11,<4. With 3.9 or 3.10 the build fails on the new field, and without it those versions also ignorelicense-files(a 3.10.1 build on main shipsLICENSE,LICENSE-sdistandLICENSE-wheeland leaves out NOTICE and DISCLAIMER).How I tested this
uv build --sdist --wheel: METADATA 2.4 withLicense-Expression: Apache-2.0andLicense-Fileentries for DISCLAIMER, LICENSE-wheel and NOTICE. A wheel rebuilt from the extracted sdist, assdist-wheel-equivalencedoes, has the same entries.twine checkpasses for both artifacts, andscripts/verify_apache_artifacts.py artifactspasses on the wheel.pre-commit run --files pyproject.tomlpasses.Notes
Release Validation installs
flitwithout a version pin; that doesn't establish which backend built past releases.apache_release.pyrunsflit build, which uses the installed backend without resolving[build-system].requires, so voters on flit older than 3.11 needpip install --upgrade flit.Other items from #901:
LICENSE-sdistas the release sdist'sLICENSE(a plainuv builddoesn't). The wheel still shipslicenses/LICENSE-wheel, andverify_apache_artifacts.pyrequires that name.license-filespoints atLICENSE-wheel, andsdist-wheel-equivalencebuilds the wheel from the sdist, so dropping it from the sdist would break that job unless the wheel's license file comes from somewhere else.0.43.0.incubatingisn't a valid PEP 440 version, so that exact filename won't work. A wheel build tag could carry it while keeping version0.43.0, e.g.apache_burr-0.43.0-1incubating-py3-none-any.whl. Build tags must start with a digit and change which wheel pip prefers among otherwise equal ones; flit doesn't produce them today, and I haven't checked PyPI acceptance.This PR only covers item 3. Items 2 (wheel side) and 5 need a decision on how the wheel gets its license file, and item 1 a naming decision. Happy to follow up on whichever direction you prefer.
I wrote this with Claude Code and reviewed and ran it myself.
Checklist