chore: replace [tool.setuptools] script-files with stackvox install-helper#18
Merged
Conversation
…elper
`script-files` is setuptools-specific, has no PEP 621 equivalent, and
doesn't round-trip through hatchling/uv if we ever migrate build
backends. The setuptools docs already mark it as discouraged.
This drops it. The bash helper now ships as package data
(`stackvox/data/stackvox-say`) and a new `stackvox install-helper`
subcommand copies it onto PATH:
pipx install stackvox
stackvox install-helper # copies bash helper to ~/.local/bin
stackvox-say "now use the fast helper"
`--prefix DIR` overrides the destination; if the chosen prefix isn't
on PATH the command emits a hint pointing at the absolute path. The
step is opt-in — users who only need the Python `stackvox say` client
can skip it.
Trade-off: one extra command after install. Reward: the helper keeps
its bash-only, ~13ms-IPC latency (a Python entry point would have
added ~150ms of interpreter startup, defeating the design).
- tests/test_cli.py: TestCmdInstallHelper covers the copy, the
exec-bit, prefix creation, and the on-/off-PATH branches.
- README install section explains the opt-in helper step.
- bin/ directory removed; helper now lives at stackvox/data/stackvox-say.
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
Drops the deprecated `[tool.setuptools] script-files` mechanism. The bash helper now ships as package data and is copied onto PATH explicitly via a new `stackvox install-helper` subcommand.
Why
`script-files` is setuptools-specific, marked as discouraged in the setuptools docs, has no PEP 621 equivalent, and doesn't round-trip through hatchling / uv. Removing it now unblocks any future build-backend migration and removes a future deprecation warning.
The naive replacement — wrap the bash helper in a Python entry point — would have added ~150–300ms of interpreter startup to every `stackvox-say` call, defeating the whole reason the helper exists (~13ms IPC round-trip from shell hooks). So instead the install step becomes explicit, opt-in, and the helper stays pure bash.
Install flow
`--prefix DIR` overrides the destination. When the chosen prefix isn't on PATH the command prints a hint with the absolute path so users aren't left guessing why `stackvox-say` "doesn't work after install".
Changes
Verification
Test plan
Migration note for users on 0.2.x
After upgrading to 0.3.0, the previously-installed `stackvox-say` (placed by setuptools' `script-files` into the venv's `bin/` dir) is no longer refreshed automatically. New installs need to run `stackvox install-helper` once. We'll call this out explicitly in the release notes.