install: add .pth for /usr/lib/python3/dist-packages (fixes gi import in venv)
On Debian/Ubuntu, python3-gi is installed into the non-versioned /usr/lib/python3/dist-packages path which venvs exclude even with --system-site-packages. A debian-system-packages.pth file adds it to sys.path so `import gi` works from the venv. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
f877a76550
commit
836287d4f4
@ -39,6 +39,12 @@ echo "==> Installing blitztext package"
|
||||
# Copy the package into site-packages so this source folder can be deleted.
|
||||
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
|
||||
|
||||
echo "==> Writing default config (if absent)"
|
||||
"$VENV/bin/python" -m blitztext config-path
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user