Commits

Doug Hellmann committed eec3b17

Use VIRTUALENVWRAPPER_VIRTUALENV in cpvirtualenv. fixes #104

Comments (0)

Files changed (3)

docs/en/history.rst

 Release History
 ===============
 
+dev
+
+  - Use VIRTUALENVWRAPPER_VIRTUALENV in `cpvirtualenv` (:bbissue:`104`).
+
 2.7.2
 
   - Move setup code for tab completion later in the startup code so
     assertTrue "$WORKON_HOME not in $VIRTUAL_ENV" "echo $VIRTUAL_ENV | grep -q $WORKON_HOME"
 }
 
+fake_virtualenv () {
+    typeset envname="$1"
+    touch "$envname/fake_virtualenv_was_here"
+    virtualenv $@
+}
+
+test_virtualenvwrapper_virtualenv_variable () {
+    mkvirtualenv "source"
+    export VIRTUALENVWRAPPER_VIRTUALENV=fake_virtualenv
+    cpvirtualenv "source" "destination"
+    unset VIRTUALENVWRAPPER_VIRTUALENV
+    assertTrue "wrapper was not run" "[ -f $VIRTUAL_ENV/fake_virtualenv_was_here ]"
+}
+
 test_source_relocatable () {
     mkvirtualenv "source"
     (cd tests/testpackage && python setup.py install) >/dev/null 2>&1

virtualenvwrapper.sh

         \chmod a+x "$script"
     done
 
-    virtualenv "$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" && ( 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.