Skip to content

Commit 006b7c0

Browse files
author
Larry Peterson
committed
fixed doc_venv
1 parent bcc23ab commit 006b7c0

File tree

2 files changed

+84
-1
lines changed

2 files changed

+84
-1
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,3 @@ local/
1010
scripts/
1111
onosproject.github.io/
1212
_build/
13-
doc_venv/

doc_venv/bin/activate

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# This file must be used with "source bin/activate" *from bash*
2+
# you cannot run it directly
3+
4+
5+
if [ "${BASH_SOURCE-}" = "$0" ]; then
6+
echo "You must source this script: \$ source $0" >&2
7+
exit 33
8+
fi
9+
10+
deactivate () {
11+
unset -f pydoc >/dev/null 2>&1
12+
13+
# reset old environment variables
14+
# ! [ -z ${VAR+_} ] returns true if VAR is declared at all
15+
if ! [ -z "${_OLD_VIRTUAL_PATH:+_}" ] ; then
16+
PATH="$_OLD_VIRTUAL_PATH"
17+
export PATH
18+
unset _OLD_VIRTUAL_PATH
19+
fi
20+
if ! [ -z "${_OLD_VIRTUAL_PYTHONHOME+_}" ] ; then
21+
PYTHONHOME="$_OLD_VIRTUAL_PYTHONHOME"
22+
export PYTHONHOME
23+
unset _OLD_VIRTUAL_PYTHONHOME
24+
fi
25+
26+
# This should detect bash and zsh, which have a hash command that must
27+
# be called to get it to forget past commands. Without forgetting
28+
# past commands the $PATH changes we made may not be respected
29+
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
30+
hash -r 2>/dev/null
31+
fi
32+
33+
if ! [ -z "${_OLD_VIRTUAL_PS1+_}" ] ; then
34+
PS1="$_OLD_VIRTUAL_PS1"
35+
export PS1
36+
unset _OLD_VIRTUAL_PS1
37+
fi
38+
39+
unset VIRTUAL_ENV
40+
if [ ! "${1-}" = "nondestructive" ] ; then
41+
# Self destruct!
42+
unset -f deactivate
43+
fi
44+
}
45+
46+
# unset irrelevant variables
47+
deactivate nondestructive
48+
49+
VIRTUAL_ENV="/Users/llp/systemsapproach/5G/doc_venv"
50+
export VIRTUAL_ENV
51+
52+
_OLD_VIRTUAL_PATH="$PATH"
53+
PATH="$VIRTUAL_ENV/bin:$PATH"
54+
export PATH
55+
56+
# unset PYTHONHOME if set
57+
if ! [ -z "${PYTHONHOME+_}" ] ; then
58+
_OLD_VIRTUAL_PYTHONHOME="$PYTHONHOME"
59+
unset PYTHONHOME
60+
fi
61+
62+
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT-}" ] ; then
63+
_OLD_VIRTUAL_PS1="${PS1-}"
64+
if [ "x" != x ] ; then
65+
PS1="${PS1-}"
66+
else
67+
PS1="(`basename \"$VIRTUAL_ENV\"`) ${PS1-}"
68+
fi
69+
export PS1
70+
fi
71+
72+
# Make sure to unalias pydoc if it's already there
73+
alias pydoc 2>/dev/null >/dev/null && unalias pydoc || true
74+
75+
pydoc () {
76+
python -m pydoc "$@"
77+
}
78+
79+
# This should detect bash and zsh, which have a hash command that must
80+
# be called to get it to forget past commands. Without forgetting
81+
# past commands the $PATH changes we made may not be respected
82+
if [ -n "${BASH-}" ] || [ -n "${ZSH_VERSION-}" ] ; then
83+
hash -r 2>/dev/null
84+
fi

0 commit comments

Comments
 (0)