install: fix glob-in-redirect for .pth file; resolve site-packages via Python

Globs don't expand in redirect targets. Use the venv Python to resolve the
exact site-packages path instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
mARTin-B78 2026-06-08 20:55:32 +02:00
parent 836287d4f4
commit b8fde76d7e

View File

@ -42,8 +42,8 @@ cp -r blitztext "$VENV/lib/python"*/site-packages/
# On Debian/Ubuntu, python3-gi lives in /usr/lib/python3/dist-packages — the
# generic (non-versioned) path that venvs don't include even with
# --system-site-packages. A .pth file adds it to sys.path at startup.
echo "/usr/lib/python3/dist-packages" \
> "$VENV/lib/python"*/site-packages/debian-system-packages.pth
SITE_PKG="$("$VENV/bin/python" -c "import site; print(site.getsitepackages()[0])")"
echo "/usr/lib/python3/dist-packages" > "$SITE_PKG/debian-system-packages.pth"
echo "==> Writing default config (if absent)"
"$VENV/bin/python" -m blitztext config-path