File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed
Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change 22Release History
33===============
44
5+ dev
6+
7+ - Use VIRTUALENVWRAPPER_VIRTUALENV in `cpvirtualenv ` (:bbissue: `104 `).
8+
592.7.2
610
711 - Move setup code for tab completion later in the startup code so
Original file line number Diff line number Diff line change @@ -43,6 +43,20 @@ test_virtual_env_variable () {
4343 assertTrue " $WORKON_HOME not in $VIRTUAL_ENV " " echo $VIRTUAL_ENV | grep -q $WORKON_HOME "
4444}
4545
46+ fake_virtualenv () {
47+ typeset envname=" $1 "
48+ touch " $envname /fake_virtualenv_was_here"
49+ virtualenv $@
50+ }
51+
52+ test_virtualenvwrapper_virtualenv_variable () {
53+ mkvirtualenv " source"
54+ export VIRTUALENVWRAPPER_VIRTUALENV=fake_virtualenv
55+ cpvirtualenv " source" " destination"
56+ unset VIRTUALENVWRAPPER_VIRTUALENV
57+ assertTrue " wrapper was not run" " [ -f $VIRTUAL_ENV /fake_virtualenv_was_here ]"
58+ }
59+
4660test_source_relocatable () {
4761 mkvirtualenv " source"
4862 (cd tests/testpackage && python setup.py install) > /dev/null 2>&1
Original file line number Diff line number Diff line change @@ -612,7 +612,7 @@ cpvirtualenv() {
612612 \c hmod a+x " $script "
613613 done
614614
615- virtualenv " $target_env " --relocatable
615+ " $VIRTUALENVWRAPPER_VIRTUALENV " " $target_env " --relocatable
616616 \s ed " s/VIRTUAL_ENV\(.*\)$env_name /VIRTUAL_ENV\1$new_env /g" < " $source_env /bin/activate" > " $target_env /bin/activate"
617617
618618 (cd " $WORKON_HOME " && (
You can’t perform that action at this time.
0 commit comments