From f815525f184658ce291b3882b089dcc24036593f Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 14 Mar 2015 02:33:21 +0100 Subject: simplify virtualenv - add dev.bat for Windows users - remove ~/.pipcache creation. If that causes issues with PyInstaller, we should use pip --no-cache-dir there or rm -r pip.locations.USER_CACHE_DIR. - remove superfluous pip install calls. --- README.mkd | 2 +- dev | 12 +----------- dev.bat | 6 ++++++ 3 files changed, 8 insertions(+), 12 deletions(-) create mode 100644 dev.bat diff --git a/README.mkd b/README.mkd index ce276764..d362fc69 100644 --- a/README.mkd +++ b/README.mkd @@ -65,7 +65,7 @@ To confirm that you're up and running, activate the virtualenv, and run the mitmproxy test suite: ``` -$ source ../venv.mitmproxy/bin/activate +$ ../venv.mitmproxy/bin/activate $ nosetests ./test ``` Note that the main executables for the project - **mitmdump**, **mitmproxy** and diff --git a/dev b/dev index c8346af1..457b69cf 100755 --- a/dev +++ b/dev @@ -1,16 +1,6 @@ #!/bin/sh VENV=../venv.mitmproxy -PIP="$VENV/bin/pip --cache-dir ~/.pipcache" - -echo "This script sets up the following:" -echo "\t~/.pipcache - A pip cache directory" -echo "\t$VENV - A development virtualenv" - -mkdir -p ~/.pipcache virtualenv $VENV source $VENV/bin/activate -$PIP install -r ./requirements.txt -# Re-install these to make them editable -$PIP install --editable ../netlib -$PIP install --editable ../pathod +pip install --src .. -r requirements.txt \ No newline at end of file diff --git a/dev.bat b/dev.bat new file mode 100644 index 00000000..ca864806 --- /dev/null +++ b/dev.bat @@ -0,0 +1,6 @@ +@echo off +set VENV=..\venv.mitmproxy + +virtualenv %VENV% +call %VENV%\Scripts\activate.bat +pip install --src .. -r requirements.txt \ No newline at end of file -- cgit v1.2.3 From f309eb35264e8872570cacace6628e46949ae3c5 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 14 Mar 2015 02:42:50 +0100 Subject: Update README.mkd --- README.mkd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.mkd b/README.mkd index d362fc69..ca412e6f 100644 --- a/README.mkd +++ b/README.mkd @@ -64,8 +64,8 @@ checkouts will be reflected live in the virtualenv. To confirm that you're up and running, activate the virtualenv, and run the mitmproxy test suite: -``` -$ ../venv.mitmproxy/bin/activate +```shell +$ source ../venv.mitmproxy/bin/activate # ..\venv.mitmproxy\Scripts\activate.bat on Windows $ nosetests ./test ``` Note that the main executables for the project - **mitmdump**, **mitmproxy** and -- cgit v1.2.3 From e9a5a26bf07bc1013a72e35b743963b709e1997b Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 14 Mar 2015 03:08:34 +0100 Subject: ./dev: echo what we have done --- dev | 7 ++++++- dev.bat | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dev b/dev index 457b69cf..9f66cbaf 100755 --- a/dev +++ b/dev @@ -3,4 +3,9 @@ VENV=../venv.mitmproxy virtualenv $VENV source $VENV/bin/activate -pip install --src .. -r requirements.txt \ No newline at end of file +pip install --src .. -r requirements.txt + +echo "" +echo "* Created virtualenv environment in $VENV." +echo "* Installed all dependencies into the virtualenv." +echo "* Activated virtualenv environment." \ No newline at end of file diff --git a/dev.bat b/dev.bat index ca864806..303c804e 100644 --- a/dev.bat +++ b/dev.bat @@ -3,4 +3,9 @@ set VENV=..\venv.mitmproxy virtualenv %VENV% call %VENV%\Scripts\activate.bat -pip install --src .. -r requirements.txt \ No newline at end of file +pip install --src .. -r requirements.txt + +echo. +echo * Created virtualenv environment in %VENV%. +echo * Installed all dependencies into the virtualenv. +echo * Activated virtualenv environment. \ No newline at end of file -- cgit v1.2.3