mirror of
https://github.com/zhigang1992/mitmproxy.git
synced 2026-04-29 04:35:02 +08:00
Merge pull request #517 from mitmproxy/virtualenv-win
simplify virtualenv
This commit is contained in:
@@ -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:
|
||||
|
||||
```
|
||||
$ source ../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
|
||||
|
||||
17
dev
17
dev
@@ -1,16 +1,11 @@
|
||||
#!/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
|
||||
|
||||
echo ""
|
||||
echo "* Created virtualenv environment in $VENV."
|
||||
echo "* Installed all dependencies into the virtualenv."
|
||||
echo "* Activated virtualenv environment."
|
||||
11
dev.bat
Normal file
11
dev.bat
Normal file
@@ -0,0 +1,11 @@
|
||||
@echo off
|
||||
set VENV=..\venv.mitmproxy
|
||||
|
||||
virtualenv %VENV%
|
||||
call %VENV%\Scripts\activate.bat
|
||||
pip install --src .. -r requirements.txt
|
||||
|
||||
echo.
|
||||
echo * Created virtualenv environment in %VENV%.
|
||||
echo * Installed all dependencies into the virtualenv.
|
||||
echo * Activated virtualenv environment.
|
||||
Reference in New Issue
Block a user