mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-17 16:03:42 -05:00
Fix wrong library path for virtualenv on PyPy/Jython (fixes #134)
This commit is contained in:
@@ -22,10 +22,18 @@ if [ ! -x "${PYENV_COMMAND_PATH}" ]; then
|
||||
fi
|
||||
else
|
||||
# virtualenv
|
||||
shopt -s nullglob
|
||||
virtualenv_prefix="$(cat "${PYENV_ROOT}/versions/${version}/lib/"*"/orig-prefix.txt" </dev/null 2>&1 || true)"
|
||||
no_global_site_packages="$(echo "${PYENV_ROOT}/versions/${version}/lib/"*"/no-global-site-packages.txt")"
|
||||
shopt -u nullglob
|
||||
if [ -d "${PYENV_ROOT}/versions/${version}/Lib" ]; then
|
||||
# jython
|
||||
virtualenv_libpath="${PYENV_ROOT}/versions/${version}/Lib"
|
||||
else
|
||||
if [ -d "${PYENV_ROOT}/versions/${version}/lib-python" ]; then
|
||||
# pypy
|
||||
virtualenv_libpath="${PYENV_ROOT}/versions/${version}/lib-python"
|
||||
else
|
||||
virtualenv_libpath="${PYENV_ROOT}/versions/${version}/lib"
|
||||
fi
|
||||
fi
|
||||
no_global_site_packages="$(find "${virtualenv_libpath}/" -maxdepth 2 -type f -and -name "no-global-site-packages.txt" 2>/dev/null | head -1)"
|
||||
if [ ! -f "${no_global_site_packages}" ]; then
|
||||
include_system_site_packages=1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user