Skip to content

fix(bootstrap): install piper-tts as a uv tool pinned to Python 3.13 - #360

Merged
evansenter merged 2 commits into
mainfrom
fix/piper-tts-uv
Nov 14, 2026
Merged

evansenter merged 2 commits into
mainfrom
fix/piper-tts-uv

Conversation

@evansenter

Copy link
Copy Markdown
Owner

bootstrap.sh -p failed at "Updating pip packages". Homebrew moved python@3 to 3.15 and removed 3.14. That left /opt/homebrew/bin/piper pointing at an interpreter that no longer exists, and pip couldn't reinstall it because onnxruntime has no 3.15 wheels yet. The failure was hidden by 2>/dev/null || true.

  • Install and upgrade piper-tts with uv tool install --upgrade --force --python 3.13. This works the same on every platform, keeps it in its own environment, and Homebrew Python bumps no longer affect it.
  • Remove the separate pip install step that only ran on apt systems. update_packages always runs right after install_packages, and uv is already installed by that point on macOS (Brewfile) and Linux (install_linux_common_packages).

Verified locally: piper --help runs from ~/.local/bin, re-running the command works, and make check passes (67/67).

🤖 Generated with Claude Code

https://claude.ai/code/session_01Te8twFgueonWjBhaqiq4Ea

Homebrew bumped python@3 to 3.15 and removed 3.14, which left the
pip-installed piper with a dangling shebang. The pip reinstall then
failed because onnxruntime has no 3.15 wheels yet. Install piper-tts
with uv tool on a pinned 3.13 instead, so Homebrew Python bumps no
longer affect it. This also drops the separate install step that only
ran on apt systems.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Te8twFgueonWjBhaqiq4Ea
claude[bot]
claude Bot previously approved these changes Nov 14, 2026

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review — Round 1

Summary

Switching piper-tts from pip to uv tool install --python 3.13 fixes the Homebrew python@3 bump breakage at its source, and dropping the 2>/dev/null || true means future failures show up as a warning instead of being hidden. update_packages always runs right after install_packages under -p, so it's fine to merge the apt-only install step into it. PATH order in .exports puts ~/.local/bin ahead of Homebrew, so the new piper takes priority over the dangling /opt/homebrew/bin/piper.

Verdict

APPROVE - No blocking findings. Two non-blocking suggestions inline: on a fresh Linux box, the first run skips piper because the new uv binary isn't on PATH yet, and a leftover stale entrypoint could be cleaned up.


Automated review by Claude Code

Comment thread bootstrap.sh
echo "Updating pip packages..."
pip3 install --upgrade piper-tts 2>/dev/null || pip3 install --upgrade --break-system-packages piper-tts 2>/dev/null || true
if [[ "$INSTALL_AI" == true ]]; then
if command -v uv >/dev/null 2>&1; then

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[Suggestion] On a fresh Linux/SteamOS machine, uv may not be visible to this process yet. install_linux_common_packages installs uv with curl … astral.sh/uv/install.sh | sh, which puts it in ~/.local/bin. The installer edits shell rc files but not this process's PATH, and bootstrap.sh never adds ~/.local/bin to PATH itself. On a first ./bootstrap.sh -p, from a shell where ~/.local/bin wasn't on PATH (Ubuntu's ~/.profile only adds it if the dir existed at login), command -v uv fails here and the run prints Skipping piper-tts (uv not installed). The old apt path installed piper on that first run via pip3 --user, so this is a small first-run regression. It fixes itself on the next run.

Cheap fix: after the uv install in install_linux_common_packages, mirror the ~/.cargo/env pattern used for rustup, e.g. [[ -d "$HOME/.local/bin" && ":$PATH:" != *":$HOME/.local/bin:"* ]] && export PATH="$HOME/.local/bin:$PATH". Or have this check fall back to $HOME/.local/bin/uv.

Comment thread bootstrap.sh
if [[ "$INSTALL_AI" == true ]]; then
if command -v uv >/dev/null 2>&1; then
echo "Installing/updating piper-tts..."
# --force: take over a `piper` entrypoint left by an earlier pip --user install

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

[Suggestion] --force only takes over entrypoints in uv's own bin dir (~/.local/bin). On the macOS machine that hit this bug, the pip-installed /opt/homebrew/bin/piper, whose shebang points to the removed 3.14 interpreter, is left in place. It's harmless for interactive shells because .exports puts ~/.local/bin first. Anything with a Homebrew-only PATH, such as a LaunchAgent or a non-login hook, would still resolve to the broken one. You could optionally remove it in cleanup_legacy_configs, but only when it's a regular file whose shebang interpreter no longer exists, so a working install is never touched.

On a fresh Linux machine, the uv installer only edits shell rc files,
so the update_packages step in the same run couldn't find uv and
skipped piper-tts. Addresses review feedback on #360.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Te8twFgueonWjBhaqiq4Ea
@evansenter

Copy link
Copy Markdown
Owner Author

Feedback Addressed

Implemented

  • [Suggestion] bootstrap.sh:951 uv not on PATH on a fresh Linux machine: after the uv install, ~/.local/bin is now exported to PATH for the rest of the run, the same way ~/.cargo/env is handled.

Skipped

  • [Suggestion] bootstrap.sh:953 broken /opt/homebrew/bin/piper left behind: it's a one-time migration. I already deleted it on the affected Mac, and any other Mac only needs rm /opt/homebrew/bin/piper. Not worth adding cleanup logic for.

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Prompt: evansenter/dotfiles/.../claude-review.md

Code Review — Round 2

Summary

The round-1 first-run PATH suggestion is fixed: install_linux_common_packages now exports ~/.local/bin to PATH, so update_packages can find a uv that was just installed. The new line is [[ ... ]] && export ..., which is safe under set -euo pipefail: a failed test on the left of && doesn't trigger errexit, and the line isn't the function's last statement, so it can't become the function's return status. Both callers run in the same shell (install_packages → update_packages, no subshell), so the export carries through. I found nothing new.

Previously Addressed (Filtered)

  • [Suggestion] bootstrap.sh uv not on PATH on a fresh Linux machine: Implemented
  • [Suggestion] bootstrap.sh broken /opt/homebrew/bin/piper left behind: Skipped (one-time migration)

Verdict

APPROVE - No blocking findings.


Automated review by Claude Code

@evansenter
evansenter merged commit 721ece7 into main Nov 14, 2026
6 checks passed
@evansenter
evansenter deleted the fix/piper-tts-uv branch November 14, 2026 19:32
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.

1 participant