tox: Don't expand symlinks

`virtualenv` < 20.0.0 copies system python binary into virt
environment and then links `python` to it. While
`virtualenv` >= 20.0.0 directly links `python` to system python
binary (without copying).

`realpath` by default expands symlinks. Thereby, pip attempts to
install packages into the system's site-packages and
fails with 'Permission denied' (non-privileged user).

Fixes: https://pagure.io/freeipa/issue/8475
Signed-off-by: Stanislav Levin <slev@altlinux.org>
Reviewed-By: Alexander Bokovoy <abokovoy@redhat.com>
This commit is contained in:
Stanislav Levin 2020-08-27 17:20:49 +03:00 committed by Alexander Bokovoy
parent 30cf59d0ae
commit fdb227e55a

View File

@ -2,8 +2,8 @@
set -ex
FLAVOR="$1"
ENVPYTHON="$(realpath "$2")"
ENVSITEPACKAGESDIR="$(realpath "$3")"
ENVPYTHON="$(realpath -s "$2")"
ENVSITEPACKAGESDIR="$(realpath -s "$3")"
ENVDIR="$4"
# 4...end are package requirements
shift 4