canopy_cli -h
canopy_cli --common-install --no-gui-setup --install-dir $PWD
</source>
Now we want to make a tcsh activation script.
<source lang="bash">
cat > cshr_epd << 'EOF'
set VIRTUAL_ENV_DISABLE_PROMPT=1
# unset irrelavent variables
if ( $?_OLD_VIRTUAL_PATH ) then
set PATH=$_OLD_VIRTUAL_PATH
setenv PATH $PATH
unset _OLD_VIRTUAL_PATH
endif
if ( $?_OLD_VIRTUAL_PYTHONHOME ) then
set PYTHONHOME=$_OLD_VIRTUAL_PYTHONHOME
setenv PYTHONHOME $PYTHONHOME
unset _OLD_VIRTUAL_PYTHONHOME
endif
if ( $?_OLD_VIRTUAL_PS1) then
set PS1=$_OLD_VIRTUAL_PS1
setenv PS1 $PS1
unset _OLD_VIRTUAL_PS1
endif
unset VIRTUAL_ENV
set VIRTUAL_ENV=MYINSTALLDIR
setenv VIRTUAL_ENV $VIRTUAL_ENV
set _OLD_VIRTUAL_PATH=$PATH
set PATH=$VIRTUAL_ENV/bin:$PATH
setenv PATH $PATH
# unset PYTHONHOME if set
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
# could use `if (set -u; : $PYTHONHOME) ;` in bash
if ( $?PYTHONHOME ) then
set _OLD_VIRTUAL_PYTHONHOME=$PYTHONHOME
unset PYTHONHOME
endif
if ( ! $?VIRTUAL_ENV_DISABLE_PROMPT ) then
set _OLD_VIRTUAL_PS1=$PS1
if ( "x(Canopy 64bit) " != x ) then
set PS1="(Canopy 64bit) $PS1"
else if ( `basename $VIRTUAL_ENV` = "__" ) then
# special case for Aspen magic directories
# see http://www.zetadev.com/software/aspen/
set DIRN=`dirname $VIRTUAL_ENV`
set BN=`basename $DIRN`
set PS1="$BN $PS1"
else
set PS1="(`basename $VIRTUAL_ENV`)$PS1"
endif
#setenv PS1 $PS1
endif
'EOF'
# Then see it
cat cshr_epd
</source>