Repository navigation
feat: build include-what-you-use from source here, in packages/include-what-you-use - #12
Merged
Merged
Conversation
For a tool whose upstream ships source code only, [tool.wheels.binaries] names the command that builds the binaries for one platform, the runners and the files they are made of. binary-wheels.yml runs the command on each runner first, cached by the hash of those files, and the wheel build reads the binaries from binaries/. This replaces the binaries-artifacts input, which no workflow passes.
…ou-use The repository files go and the links point here. [tool.wheels] carries what test.yml and automation.yml did: the binaries built from source on six runners, the version file, the upstream and its latest tag, the update command and the binaries for the GitHub release. The smoke test looks for iwyu_tool.py.exe by its full name on Windows, where shutil.which() does not add .exe to a name with an extension.
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.
Moves include-what-you-use into
packages/include-what-you-use. It comes from the open include-what-you-use-wheel#1, with its history, and it is the last wheel to move here. IWYU publishes source code only, so this adds one shared feature: a package can build its binaries in CI.[tool.wheels.binaries]sets three things:commandbuilds the binaries for$PLATFORMintobinaries/binary-<platform>/;platformslists the runners it runs on;cache-fileslists the files the binaries are built from.binariesjob that runs the command on each runner before the wheels are built. The binaries are cached by the hash ofcache-files, so a change to anything else does not rebuild them. The build job downloads them intobinaries/. "All wheels pass" letsbinariesbe skipped for every other package. The unusedbinaries-artifactsinput goes.[tool.wheels]carries what itstest.ymlandautomation.ymldid:iwyu_version.txt;hatch_build.py update;iwyu_tool.py.exeby its full name.shutil.which()does not add.exeto a name that already has an extension. That made both Windows tests fail on include-what-you-use-wheel#1, while all 6 builds passed there.The first CI run builds IWYU from source on every platform, which takes about an hour each (1.5 hours on macOS x86_64). After that the cache holds the binaries.
Before merging
include-what-you-use: ownercpp-linter, repositorywheels, workflowpublish.yml, environmentpypi(andtestpypion TestPyPI). If one already points at include-what-you-use-wheel, replace it.include-what-you-use-v0.27, the first upload of IWYU to PyPI.Checked
pytest: 38 passed; pre-commit, actionlint (apart from the known$/self-repository syntax) and zizmor clean.python -m hatch_prebuilt info,platformsandrelease-notes, plusscripts/plan.py --tag include-what-you-use-v0.27.Generated by Claude Code