balajiX commited on
Commit
878fcb1
1 Parent(s): 1f74508

Upload activate

Browse files
Files changed (1) hide show
  1. activate +76 -0
activate ADDED
@@ -0,0 +1,76 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ unset VIRTUAL_ENV_PROMPT
32
+ if [ ! "${1:-}" = "nondestructive" ] ; then
33
+ # Self destruct!
34
+ unset -f deactivate
35
+ fi
36
+ }
37
+
38
+ # unset irrelevant variables
39
+ deactivate nondestructive
40
+
41
+ # on Windows, a path can contain colons and backslashes and has to be converted:
42
+ if [ "$OSTYPE" = "cygwin" ] || [ "$OSTYPE" = "msys" ] ; then
43
+ # transform D:\path\to\venv to /d/path/to/venv on MSYS
44
+ # and to /cygdrive/d/path/to/venv on Cygwin
45
+ export VIRTUAL_ENV=$(cygpath "C:\Users\balaj\OneDrive\Desktop\ATS\ven")
46
+ else
47
+ # use the path as-is
48
+ export VIRTUAL_ENV="C:\Users\balaj\OneDrive\Desktop\ATS\ven"
49
+ fi
50
+
51
+ _OLD_VIRTUAL_PATH="$PATH"
52
+ PATH="$VIRTUAL_ENV/Scripts:$PATH"
53
+ export PATH
54
+
55
+ # unset PYTHONHOME if set
56
+ # this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
57
+ # could use `if (set -u; : $PYTHONHOME) ;` in bash
58
+ if [ -n "${PYTHONHOME:-}" ] ; then
59
+ _OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
60
+ unset PYTHONHOME
61
+ fi
62
+
63
+ if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
64
+ _OLD_VIRTUAL_PS1="${PS1:-}"
65
+ PS1="(ven) ${PS1:-}"
66
+ export PS1
67
+ VIRTUAL_ENV_PROMPT="(ven) "
68
+ export VIRTUAL_ENV_PROMPT
69
+ fi
70
+
71
+ # This should detect bash and zsh, which have a hash command that must
72
+ # be called to get it to forget past commands. Without forgetting
73
+ # past commands the $PATH changes we made may not be respected
74
+ if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
75
+ hash -r 2> /dev/null
76
+ fi