Skip to content

Fix CI: Keep Python README within package builds - #1040

Merged
tankyleo merged 1 commit into
lightningdevkit:mainfrom
tnull:2026-08-investigate-python-ci
Aug 12, 2026
Merged

Fix CI: Keep Python README within package builds#1040
tankyleo merged 1 commit into
lightningdevkit:mainfrom
tnull:2026-08-investigate-python-ci

Conversation

@tnull

@tnull tnull commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator

Load the repository README through Hatchling metadata so builds accept the Python package configuration. Include a regular copy in source distributions so archive extraction remains safe.

(As latest hatchlings release broke our CI)

@tnull
tnull requested a review from benthecarman August 11, 2026 12:07
@ldk-reviews-bot

ldk-reviews-bot commented Aug 11, 2026

Copy link
Copy Markdown

👋 Thanks for assigning @tankyleo as a reviewer!
I'll wait for their review and will help manage the review process.
Once they submit their review, I'll check if a second reviewer would be helpful.

@tnull
tnull requested review from tankyleo and removed request for benthecarman August 11, 2026 12:07
Comment thread bindings/python/pyproject.toml Outdated
packages = ["src/ldk_node"]

[tool.hatch.build.targets.sdist.force-include]
"../../README.md" = "README.md"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For now I just had codex review this commit, it had this to say let me know if you want to fix this:

  • [P2] Make the sdist README source self-contained _ /home/ubuntu/ldk-node/bindings/python/pyproject.toml:34-34
    When an extracted sdist is repackaged, this mapping still resolves ../../README.md outside the extracted package, where that file is absent. Consequently, running a standard build such as python -m build on the sdist raises FileNotFoundError: Forced include not found, even though the archive
    contains its own README.md; the sdist configuration should use that local copy when rebuilding.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Here's what codex came up with to fix this, feel free to grab it if it's useful: tankyleo@d5bd4df

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Hmm, strange it didn't find it first. Now amended the commit.

Load the repository README through Hatchling metadata so builds accept
the Python package configuration. Include a regular copy in source
distributions so archive extraction remains safe.

Co-Authored-By: HAL 9000
@tnull
tnull force-pushed the 2026-08-investigate-python-ci branch from aae54bc to 4144da2 Compare August 12, 2026 08:01
@tnull
tnull requested a review from tankyleo August 12, 2026 08:02
@tankyleo
tankyleo merged commit 49bc676 into lightningdevkit:main Aug 12, 2026
25 of 37 checks passed
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.

3 participants