From fb0a5d8f6383e689ccfbb498b0b3501dbdf712e2 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Wed, 8 Apr 2015 11:59:00 +1200 Subject: [PATCH] Add an autoenv file to auto-activate the virtualenv See https://github.com/kennethreitz/autoenv --- .env | 5 +++++ README.mkd | 4 ++++ 2 files changed, 9 insertions(+) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 000000000..7f847e29f --- /dev/null +++ b/.env @@ -0,0 +1,5 @@ +DIR=`dirname $0` +if [ -z "$VIRTUAL_ENV" ] && [ -f $DIR/../venv.mitmproxy/bin/activate ]; then + echo "Activating mitmproxy virtualenv..." + source $DIR/../venv.mitmproxy/bin/activate +fi diff --git a/README.mkd b/README.mkd index ca412e6f1..b5453c22f 100644 --- a/README.mkd +++ b/README.mkd @@ -75,6 +75,10 @@ command: ```$ mitmdump --version``` +For convenience, the project includes an +[autoenv](https://github.com/kennethreitz/autoenv) file +([.env](https://github.com/mitmproxy/mitmproxy/blob/master/.env)) that +auto-activates the virtualenv when you cd into the mitmproxy directory. ### Testing