From fdb227e55ab976fb26ef417df1e4a842d3280f5c Mon Sep 17 00:00:00 2001 From: Stanislav Levin Date: Thu, 27 Aug 2020 17:20:49 +0300 Subject: [PATCH] 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 Reviewed-By: Alexander Bokovoy --- .tox-install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.tox-install.sh b/.tox-install.sh index 95f5c1e70..ff22b4d79 100755 --- a/.tox-install.sh +++ b/.tox-install.sh @@ -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