aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2015-04-08 11:59:00 +1200
committerAldo Cortesi <aldo@nullcube.com>2015-04-08 11:59:00 +1200
commitfb0a5d8f6383e689ccfbb498b0b3501dbdf712e2 (patch)
treee5c0bcd23e93994eabf7f3b4fc259dd29fb4e798
parent8e2e83a3c6d47e52a5398f851b2900dd042f3d6a (diff)
downloadmitmproxy-fb0a5d8f6383e689ccfbb498b0b3501dbdf712e2.tar.gz
mitmproxy-fb0a5d8f6383e689ccfbb498b0b3501dbdf712e2.tar.bz2
mitmproxy-fb0a5d8f6383e689ccfbb498b0b3501dbdf712e2.zip
Add an autoenv file to auto-activate the virtualenv
See https://github.com/kennethreitz/autoenv
-rw-r--r--.env5
-rw-r--r--README.mkd4
2 files changed, 9 insertions, 0 deletions
diff --git a/.env b/.env
new file mode 100644
index 00000000..7f847e29
--- /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 ca412e6f..b5453c22 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