fix: bundle Swift HUD source in wheel so uvx installs can auto-build#7
Merged
Conversation
The v0.1-0.4 wheels were Python-only (`packages = ["src/cept"]`). Under `uvx --from cept cept` — which is how the eidos-marketplace plugin invokes cept — `find_source_dir()` couldn't locate `hud/Package.swift`, `build()` returned None, and the HUD adapter silently no-op'd. The floating popup feature shipped in v0.4.0 was structurally correct but invisible to anyone installing from PyPI. Fix uses hatchling `force-include` to ship the swift source as `cept/_hud_source/` inside the wheel. `find_source_dir()` now checks that path first; existing editable / source-checkout layout still works via the ancestor-walk fallback. Verified: wheel inspection shows `cept/_hud_source/Package.swift` and `cept/_hud_source/Sources/cept-hud/main.swift` present. Under `uv tool install` of the built wheel, `find_source_dir()` resolves to the bundled location and the build succeeds. Co-Authored-By: Claude Opus 4.7 (1M context) <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.
Summary
The v0.1-v0.4 wheels were Python-only — `hud/` was in the sdist but never the wheel. Under `uvx --from cept cept` (how the eidos-marketplace plugin invokes cept), `find_source_dir()` couldn't locate `hud/Package.swift`, `build()` returned None, and the HUD adapter silently fell back to noop. The popup feature shipped in v0.4.0 was structurally correct but invisible to anyone installing from PyPI.
What changed
Verification
```
$ python3 -c "import zipfile; z=zipfile.ZipFile('dist/cept-0.4.1-py3-none-any.whl'); print([n for n in z.namelist() if '_hud_source' in n])"
['cept/_hud_source/Package.swift', 'cept/_hud_source/Sources/cept-hud/main.swift']
$ uv tool install --reinstall dist/cept-0.4.1-py3-none-any.whl
$ uvx --from cept python -c "from cept import hud_install; print(hud_install.find_source_dir())"
/Users/.../site-packages/cept/_hud_source
```
Test plan
🤖 Generated with Claude Code