Add generic bootstrap_python()
logic
This commit is contained in:
parent
aa3ef708ad
commit
68088a6e71
2 changed files with 44 additions and 6 deletions
16
rattail_fabric2/deploy/python/premkvirtualenv
Executable file
16
rattail_fabric2/deploy/python/premkvirtualenv
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
# This hook is run after a new virtualenv is created and before it is activated.
|
||||
|
||||
cat >$1/pip.conf <<EOF
|
||||
[global]
|
||||
log-file = $WORKON_HOME/$1/pip.log
|
||||
exists-action = i
|
||||
EOF
|
||||
|
||||
cat >$1/bin/postactivate <<EOF
|
||||
export PIP_CONFIG_FILE=$WORKON_HOME/$1/pip.conf
|
||||
EOF
|
||||
|
||||
cat >$1/bin/postdeactivate <<EOF
|
||||
unset PIP_CONFIG_FILE
|
||||
EOF
|
Loading…
Add table
Add a link
Reference in a new issue