mirror of
https://github.com/pyenv/pyenv-virtualenv.git
synced 2025-11-19 00:53:40 -05:00
Compare commits
4 Commits
master
...
284b8f7ddb
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
284b8f7ddb | ||
|
|
999a0f2cbc | ||
|
|
a96eac5409 | ||
|
|
9c233132eb |
@@ -149,8 +149,11 @@ detect_venv() {
|
||||
# Check the existence of executables as a workaround for the issue with pyenv-which-ext
|
||||
# https://github.com/yyuu/pyenv-virtualenv/issues/26
|
||||
local prefix="$(pyenv-prefix)"
|
||||
if [ -x "${prefix}/bin/conda" ]; then
|
||||
if [ -d "${prefix}/conda-meta" ] || [ -x "${prefix}/bin/conda" ]; then
|
||||
HAS_CONDA=1
|
||||
if [ -d "${prefix}/envs" ]; then
|
||||
IS_BASE_CONDA=1
|
||||
fi
|
||||
else
|
||||
if [ -x "${prefix}/bin/virtualenv" ]; then
|
||||
HAS_VIRTUALENV=1
|
||||
@@ -605,7 +608,11 @@ STATUS=0
|
||||
mkdir -p "${PYENV_VIRTUALENV_CACHE_PATH}"
|
||||
cd "${PYENV_VIRTUALENV_CACHE_PATH}"
|
||||
if [ -n "${USE_CONDA}" ]; then
|
||||
pyenv-exec conda create $QUIET $VERBOSE --name "${VIRTUALENV_PATH##*/}" --yes "${VIRTUALENV_OPTIONS[@]}" python || STATUS="$?"
|
||||
if [ -n "${IS_BASE_CONDA}" ]; then
|
||||
pyenv-exec conda create $QUIET $VERBOSE --name "${VIRTUALENV_PATH##*/}" --yes "${VIRTUALENV_OPTIONS[@]}" python || STATUS="$?"
|
||||
else
|
||||
pyenv-exec conda create $QUIET $VERBOSE --clone "${VERSION_NAME##*/}" --name "${VIRTUALENV_PATH##*/}" --yes "${VIRTUALENV_OPTIONS[@]}" || STATUS="$?"
|
||||
fi
|
||||
else
|
||||
if [ -n "${USE_M_VENV}" ]; then
|
||||
pyenv-exec "${M_VENV_PYTHON_BIN:-python}" -m venv $QUIET $VERBOSE "${VIRTUALENV_OPTIONS[@]}" "${VIRTUALENV_PATH}" || STATUS="$?"
|
||||
|
||||
Reference in New Issue
Block a user