rattail-fabric2/rattail_fabric2/deploy/python/premkvirtualenv

17 lines
327 B
Plaintext
Raw Normal View History

2019-09-13 13:20:45 -05:00
#!/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