mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-14 22:43:52 -05:00
Fix wrong library path for virtualenv on PyPy/Jython (fixes #134)
This commit is contained in:
@@ -38,9 +38,21 @@ for version in "${versions[@]}"; do
|
||||
VIRTUALENV_PREFIX_PATH="${virtualenv_binpath%/bin}"
|
||||
else
|
||||
# virtualenv
|
||||
shopt -s nullglob
|
||||
VIRTUALENV_PREFIX_PATH="$(cat "${PYENV_ROOT}/versions/${version}/lib/"*"/orig-prefix.txt" </dev/null 2>&1 || true)"
|
||||
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
|
||||
virtualenv_orig_prefix="$(find "${virtualenv_libpath}/" -maxdepth 2 -type f -and -name "orig-prefix.txt" 2>/dev/null | head -1)"
|
||||
if [ -f "${virtualenv_orig_prefix}" ]; then
|
||||
VIRTUALENV_PREFIX_PATH="$(cat "${virtualenv_orig_prefix}" 2>/dev/null || true)"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ -d "${VIRTUALENV_PREFIX_PATH}" ]; then
|
||||
|
||||
Reference in New Issue
Block a user