Fix Python bindings build with recent hatchling releases - #1043
Closed
vincenzopalazzo wants to merge 1 commit into
Closed
Fix Python bindings build with recent hatchling releases#1043vincenzopalazzo wants to merge 1 commit into
hatchling releases#1043vincenzopalazzo wants to merge 1 commit into
Conversation
`hatchling` validates that `project.readme` resolves inside the project
directory, so our `readme = "../../README.md"` now aborts every build of
the Python bindings with:
ValueError: Readme path must be within the project directory: ../../README.md
This breaks the `check-python` CI job as well as `python_build_wheel.sh`.
Rather than duplicating the README into `bindings/python`, declare
`readme` dynamic and read the repository README from a custom metadata
hook, which hands it over as literal text and hence skips the path
validation. The resulting wheel metadata is byte-identical to what we
published before.
This commit was written with AI assistance.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
👋 Hi! I see this is a draft PR. |
Member
Author
|
Superseded by #1041, which fixes this with the same |
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.
Summary
check-pythonis currently failing onmain(and consequently on every open PR). Recenthatchlingreleases validate thatproject.readmeresolves inside the project directory, so ourreadme = "../../README.md"aborts the build before anything else runs:This affects
scripts/python_build_wheel.shtoo, not just CI.Rather than duplicating the README into
bindings/python/, this declaresreadmedynamic and reads the repository README from a custom metadata hook, which passes it along as literal text and hence skips the path validation.Test plan
uv pip install -e bindings/pythonsucceeds again (fails onmaintoday)uv build --wheelsucceeds, and the resultingMETADATAhasDescription-Content-Type: text/markdownwith a body byte-identical to the repositoryREADME.md— so the published PyPI description is unchangedDisclosure
This PR was prepared with AI assistance (Claude Code).
🤖 Generated with Claude Code