diff options
Diffstat (limited to 'python_install.sh')
| -rwxr-xr-x | python_install.sh | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/python_install.sh b/python_install.sh index c989125..1a82249 100755 --- a/python_install.sh +++ b/python_install.sh @@ -52,9 +52,8 @@ pip_install_method() wget 'https://bootstrap.pypa.io/get-pip.py' \ -O "${PIP_INSTALL_SCRIPT}" - PYTHONUSERBASE="${env_dir}" \ "${python}" "${PIP_INSTALL_SCRIPT}" --isolated \ - --user \ + --prefix=${env_dir} \ --ignore-installed \ --no-cache @@ -103,19 +102,20 @@ install_virtualenv() { local python="${1}"; shift; local env_dir="${1}"; shift; + local _pkg_dir="$(find "${env_dir}/lib" -mindepth 2 -maxdepth 2 \ + -name "site-packages")"; + local pkg_dir="$(readlink -f "${_pkg_dir}")"; + + echo "Install virtual env" # Install virtualenv - PYTHONUSERBASE="${env_dir}" \ - "${env_dir}/bin/pip" install --user \ + PYTHONPATH="${pkg_dir}" \ + "${env_dir}/bin/pip" install --prefix="${env_dir}" \ --ignore-installed \ --no-cache \ --no-binary virtualenv \ virtualenv - local _pkg_dir="$(find "${env_dir}/lib" -name "virtualenv.py" \ - -exec dirname {} \;)"; - local pkg_dir="$(readlink -f "${_pkg_dir}")"; - mkdir -p "${env_dir}/cache" PIP_CACHE_DIR="${env_dir}/cache" \ |
