Repository navigation
fix(core): ship the licence inside the wheel - #18
Merged
Merged
Conversation
The wheel had no LICENSE. Apache-2.0 asks for the licence and the NOTICE
to travel with the code, and the repo's copies sit at the root, outside
core/ -- packaging tools cannot reach above the project directory, so
they were silently left out of every build.
core/ now keeps its own copies, declared with license-files. That is a
copy, and copies drift, so test_docs.py fails if either stops matching
the root -- the same rot it already checks module maps for.
Verified by building the wheel:
dist-info/licenses/LICENSE
dist-info/licenses/NOTICE
License-Expression: Apache-2.0
and by tampering with core/NOTICE, which fails the new test.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
It is the project page on PyPI now, and it was written for someone standing in the repo. Two things were plainly wrong there: - 'Not published to PyPI' -- it is, as of today. - Every link was relative (../docs/core.md, ../CONTRACTS.md), so all of them 404 for anyone reading it on PyPI. Now absolute. Reordered for the visitor it actually gets: what it does, what makes it different (the interrupted session), pip install, then the two calls that cover most uses. The exported names are listed, since PyPI is where someone looks for them. Dropped 'Pack it', which explained how to build a wheel by hand. CI does that every release and docs/releasing.md covers it. Verified: twine check PASSED on a fresh build, Description-Content-Type is text/markdown, and no relative link remains. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Homepage was the repo root, which is about the whole product -- host, extension, desktop app -- when the visitor arrived from one package's page. It points at core/ now. Documentation is new: docs/core.md is where the flow chart and the module map are, and PyPI's sidebar was not linking to it at all. Repository stays the root, which is what a clone needs. All four checked for a 200, and read back out of the built wheel's METADATA as Project-URL lines. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Found while opening the actual
v0.1.0wheel to see what's in it: there's noLICENSEinside.Apache-2.0 asks for the licence and the
NOTICEto travel with the code. Ours sit at the repo root, outsidecore/, and packaging tools can't reach above the project directory — so they were silently dropped from every build.host/'s packaging already copies both into its archive for exactly this reason;core/never did.The fix
core/keeps its own copies, declared inpyproject.toml:That's a copy, and copies drift. So
test_docs.py— which already exists to catch things that rot silently — now fails if either stops matching the root:Verified by building it
Not asserted from the docs — I built the wheel and looked:
The
License-Expressionline also confirms thesetuptools>=77bump from PR #9 is doing its job — older setuptools would emit the legacy free-textLicense:field instead.And the drift test earns its place: appending a line to
core/NOTICEfails it, restoring it passes.pytest core/testsis 126 (was 124).Note on timing
0.1.0is already published on the release page, and you're about to upload it to PyPI. That upload will not have the licence in it — the fix lands in0.1.1, whenevercore/next changes. Not worth burning a version over; PyPI shows the licence in the metadata and links to the repo either way.Not merged, as asked.