build: Rebuild kerf-init with the package and publish a wheel PyPI accepts - #19
Merged
Merged
Conversation
pip install . packaged whatever kerf-init was already in src/kerf/data, since poetry only collects files and nothing ran make. A tree updated by git pull kept its old gitignored binary, and a spawn booted with it came up without the exec server, so kerf exec was refused. Run make init as the poetry build script so every wheel and editable install carries a kerf-init built from the current sources. The sdist now ships the C sources instead of a prebuilt binary. Signed-off-by: Cong Wang <cwang@multikernel.io>
With kerf-init built by the poetry build script, poetry tags the wheel cp311-cp311-linux_x86_64, which PyPI rejects and which would also limit it to one Python version. kerf-init is static and is the only native code, so retag the wheel py3-none for manylinux2014 and musllinux, after checking the binary is static and letting auditwheel confirm it links no system libraries. Also build a wheel from the sdist, which now ships the C sources in place of the binary, and drop the separate make step the build script replaces. Signed-off-by: Cong Wang <cwang@multikernel.io>
congwang-mk
force-pushed
the
kerf-init-build
branch
from
September 27, 2026 00:19
91b9ff9 to
88120fb
Compare
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.
pip install .packaged whateversrc/kerf/data/kerf-initwas already on disk, since poetry only collects files and nothing ranmake. The binary is gitignored, so after agit pullit stayed stale. On a test box this shipped a January kerf-init without the exec server, andkerf execwas refused with "not running kerf-init".Changes
build.pyrunsmake initas the poetry build script, so every wheel and editable install carries a kerf-init built from the current sources. The sdist now ships the C sources and Makefiles instead of a prebuilt binary.cp311-cp311-linux_x86_64, which PyPI rejects and which would pin it to one Python. kerf-init is static and is the only native code, so the release job retags the wheelpy3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.musllinux_1_1_x86_64, after checking the binary is static and lettingauditwheel showconfirm it links no system libraries. It also builds a wheel from the sdist to prove the sdist is complete.Only an x86_64 wheel is built for now. kerf on main does not run on arm64 yet, so an arm64 wheel will come with the arm64 support.
Testing
poetry build, retag,auditwheel show(consistent withmanylinux_2_5_x86_64, no external symbols),twine check, andpip wheelfrom the sdist all pass. pip installs the retagged wheel.pip wheel .rebuilds kerf-init when the binary is missing and when a source file is newer than it.kerf execon the test box.release.ymlpasses actionlint.python3 -m pytest -q: 403 passed, 1 skipped.🤖 Generated with Claude Code