Mercurial > repos > shellac > sam_consensus_v3
comparison env/bin/activate @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
author | shellac |
---|---|
date | Mon, 22 Mar 2021 18:12:50 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4f3585e2f14b |
---|---|
1 # This file must be used with "source bin/activate" *from bash* | |
2 # you cannot run it directly | |
3 | |
4 deactivate () { | |
5 # reset old environment variables | |
6 if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then | |
7 PATH="${_OLD_VIRTUAL_PATH:-}" | |
8 export PATH | |
9 unset _OLD_VIRTUAL_PATH | |
10 fi | |
11 if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then | |
12 PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}" | |
13 export PYTHONHOME | |
14 unset _OLD_VIRTUAL_PYTHONHOME | |
15 fi | |
16 | |
17 # This should detect bash and zsh, which have a hash command that must | |
18 # be called to get it to forget past commands. Without forgetting | |
19 # past commands the $PATH changes we made may not be respected | |
20 if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then | |
21 hash -r 2> /dev/null | |
22 fi | |
23 | |
24 if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then | |
25 PS1="${_OLD_VIRTUAL_PS1:-}" | |
26 export PS1 | |
27 unset _OLD_VIRTUAL_PS1 | |
28 fi | |
29 | |
30 unset VIRTUAL_ENV | |
31 if [ ! "${1:-}" = "nondestructive" ] ; then | |
32 # Self destruct! | |
33 unset -f deactivate | |
34 fi | |
35 } | |
36 | |
37 # unset irrelevant variables | |
38 deactivate nondestructive | |
39 | |
40 VIRTUAL_ENV="/Users/cmdms/OneDrive-UOB/Development/Projects/2021/sam-consensus-v3/env" | |
41 export VIRTUAL_ENV | |
42 | |
43 _OLD_VIRTUAL_PATH="$PATH" | |
44 PATH="$VIRTUAL_ENV/bin:$PATH" | |
45 export PATH | |
46 | |
47 # unset PYTHONHOME if set | |
48 # this will fail if PYTHONHOME is set to the empty string (which is bad anyway) | |
49 # could use `if (set -u; : $PYTHONHOME) ;` in bash | |
50 if [ -n "${PYTHONHOME:-}" ] ; then | |
51 _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}" | |
52 unset PYTHONHOME | |
53 fi | |
54 | |
55 if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then | |
56 _OLD_VIRTUAL_PS1="${PS1:-}" | |
57 PS1="(env) ${PS1:-}" | |
58 export PS1 | |
59 fi | |
60 | |
61 # This should detect bash and zsh, which have a hash command that must | |
62 # be called to get it to forget past commands. Without forgetting | |
63 # past commands the $PATH changes we made may not be respected | |
64 if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then | |
65 hash -r 2> /dev/null | |
66 fi |