Commits

Ales Zoulek  committed 867aa5a

Fixed default python binary and renamed env varible VIRTUALENV_BINARY

* Renamed VIRTUALENV_BINARY to VIRTUALENVWRAPPER_VIRTUALENV
* Default python binary is "python" not "python2"

  • Participants
  • Parent commits 07041d5

Comments (0)

Files changed (1)

File virtualenvwrapper.sh

 # Locate the global Python where virtualenvwrapper is installed.
 if [ "$VIRTUALENVWRAPPER_PYTHON" = "" ]
 then
-    VIRTUALENVWRAPPER_PYTHON="$(\which python2)"
+    VIRTUALENVWRAPPER_PYTHON="$(\which python)"
 fi
 
-if [ "$VIRTUALENV_BINARY" = "" ]
+if [ "$VIRTUALENVWRAPPER_VIRTUALENV" = "" ]
 then
-    VIRTUALENV_BINARY="virtualenv"
+    VIRTUALENVWRAPPER_VIRTUALENV="virtualenv"
 fi
 
 virtualenvwrapper_derive_workon_home() {
 
 # Verify that virtualenv is installed and visible
 virtualenvwrapper_verify_virtualenv () {
-    typeset venv=$(\which $VIRTUALENV_BINARY | (unset GREP_OPTIONS; \grep -v "not found"))
+    typeset venv=$(\which $VIRTUALENVWRAPPER_VIRTUALENV | (unset GREP_OPTIONS; \grep -v "not found"))
     if [ "$venv" = "" ]
     then
         echo "ERROR: virtualenvwrapper could not find virtualenv in your path" >&2
     virtualenvwrapper_verify_workon_home || return 1
     virtualenvwrapper_verify_virtualenv || return 1
     (cd "$WORKON_HOME" &&
-        $VIRTUALENV_BINARY "$@" &&
+        $VIRTUALENVWRAPPER_VIRTUALENV "$@" &&
         [ -d "$WORKON_HOME/$envname" ] && virtualenvwrapper_run_hook "pre_mkvirtualenv" "$envname"
         )
     typeset RC=$?
         \chmod a+x "$script"
     done
 
-    $VIRTUALENV_BINARY "$target_env" --relocatable
+    $VIRTUALENVWRAPPER_VIRTUALENV "$target_env" --relocatable
     \sed "s/VIRTUAL_ENV\(.*\)$env_name/VIRTUAL_ENV\1$new_env/g" < "$source_env/bin/activate" > "$target_env/bin/activate"
 
     (cd "$WORKON_HOME" &&