Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ cd stack-nudge
./install.sh
```

The installer wires hooks for every agent it finds. On macOS it also builds and installs the app, which needs the Xcode Command Line Tools. Requires Python ≥ 3.10.
The installer wires hooks for every agent it finds. On macOS it also builds and installs the app, which needs the Xcode Command Line Tools. Requires Python ≥ 3.11.

## The panel

Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ bundle_venv() {
# (no nested virtualenv layer — keeps the bundle a few MB smaller and
# avoids a redundant Python symlink dance).
echo " Installing stackvox..."
"$venv_dir/bin/python3" -m pip install --no-cache-dir --quiet 'stackvox>=0.15.0'
"$venv_dir/bin/python3" -m pip install --no-cache-dir --quiet 'stackvox>=0.16.3'

# Strip __pycache__ and pip caches to shrink the bundle. These can be
# regenerated by the bundled Python at first import — small startup
Expand Down
20 changes: 12 additions & 8 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,23 @@ if [[ "$(uname -s)" == "Darwin" ]]; then
echo " Installed StackNudge.app -> ~/Applications/StackNudge.app"
fi

# Pick a Python ≥ 3.10 for the venv. stackvox requires it, but `python3` on
# Pick a Python ≥ 3.11 for the venv. stackvox requires it, but `python3` on
# PATH is often the system 3.9 (especially in non-interactive shells).
find_python() {
if [[ -n "${STACKNUDGE_PYTHON:-}" && -x "${STACKNUDGE_PYTHON}" ]]; then
echo "${STACKNUDGE_PYTHON}"
return
fi
if command -v python3 >/dev/null 2>&1; then
if python3 -c 'import sys; sys.exit(0 if sys.version_info >= (3, 10) else 1)' 2>/dev/null; then
if python3 -c 'import sys; sys.exit(0 if sys.version_info >= (3, 11) else 1)' 2>/dev/null; then
command -v python3
return
fi
fi
for cand in /opt/homebrew/bin/python3.14 /opt/homebrew/bin/python3.13 \
/opt/homebrew/bin/python3.12 /opt/homebrew/bin/python3.11 \
/opt/homebrew/bin/python3.10 \
/usr/local/bin/python3.14 /usr/local/bin/python3.13 \
/usr/local/bin/python3.12 /usr/local/bin/python3.11 \
/usr/local/bin/python3.10; do
/usr/local/bin/python3.12 /usr/local/bin/python3.11; do
[[ -x "$cand" ]] && { echo "$cand"; return; }
done
}
Expand All @@ -89,19 +87,25 @@ find_python() {
echo ""
echo "# STAGE: venv"
echo "Setting up voice engine..."
STACKVOX_SPEC="stackvox>=0.15.0"
STACKVOX_SPEC="stackvox>=0.16.3"
PYTHON=$(find_python)
if [[ -z "$PYTHON" ]]; then
echo ""
echo " ✗ Could not find Python ≥ 3.10 — required by the bundled voice engine (stackvox)."
echo " ✗ Could not find Python ≥ 3.11 — required by the bundled voice engine (stackvox)."
echo ""
echo " Install one of these and re-run ./install.sh:"
echo " brew install python@3.13"
echo " STACKNUDGE_PYTHON=/path/to/python3 ./install.sh"
echo ""
exit 1
fi
if [[ ! -x "$VENV/bin/stackvox" ]]; then
# A venv made by an older install may sit on Python 3.10, which stackvox
# 0.16.3 no longer supports: upgrading it in place would find no matching
# release and stop the install. Rebuild it on the Python picked above instead.
venv_python_ok() {
"$VENV/bin/python3" -c 'import sys; sys.exit(0 if sys.version_info >= (3, 11) else 1)' 2>/dev/null
}
if [[ ! -x "$VENV/bin/stackvox" ]] || ! venv_python_ok; then
# Clear any partial/incompatible venv first. `python -m venv` over an
# existing directory can fail with "[Errno 17] File exists" — e.g. a venv
# left by a different Python, or an interrupted earlier install — so make
Expand Down
Loading