1
# This file must be used with "source bin/activate" *from bash*
2
# you cannot run it directly
5
unset -f pydoc >/dev/null 2>&1
7
# reset old environment variables
8
# ! [ -z ${VAR+_} ] returns true if VAR is declared at all
9
if ! [ -z "${_OLD_VIRTUAL_PATH+_}" ] ; then
10
PATH="$_OLD_VIRTUAL_PATH"
12
unset _OLD_VIRTUAL_PATH
14
if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] ; then
15
PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME"
17
unset _OLD_VIRTUAL_PYTHONHOME
20
# This should detect bash and zsh, which have a hash command that must
21
# be called to get it to forget past commands. Without forgetting
22
# past commands the $PATH changes we made may not be respected
23
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
27
if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] ; then
28
PS1="$_OLD_VIRTUAL_PS1"
30
unset _OLD_VIRTUAL_PS1
34
if [ ! "${1-}" = "nondestructive" ] ; then
40
# unset irrelevant variables
41
deactivate nondestructive
43
VIRTUAL_ENV="/root/charms/trusty/ibm-wxs-catalog/.tox/py35"
46
_OLD_VIRTUAL_PATH="$PATH"
47
PATH="$VIRTUAL_ENV/bin:$PATH"
50
# unset PYTHONHOME if set
51
if ! [ -z "${PYTHONHOME+_}" ] ; then
52
_OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME"
56
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then
57
_OLD_VIRTUAL_PS1="$PS1"
58
if [ "x" != x ] ; then
61
PS1="(`basename \"$VIRTUAL_ENV\"`) $PS1"
66
# Make sure to unalias pydoc if it's already there
67
alias pydoc 2>/dev/null >/dev/null && unalias pydoc
73
# This should detect bash and zsh, which have a hash command that must
74
# be called to get it to forget past commands. Without forgetting
75
# past commands the $PATH changes we made may not be respected
76
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then