aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore3
-rwxr-xr-xdev.sh29
-rw-r--r--web/README2
3 files changed, 10 insertions, 24 deletions
diff --git a/.gitignore b/.gitignore
index bccb8f99..1b44bd29 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,8 +1,7 @@
.DS_Store
MANIFEST
*/tmp
-/venv
-/venv3
+/venv*
*.py[cdo]
*.swp
*.swo
diff --git a/dev.sh b/dev.sh
index 0d1a8d98..111f09bc 100755
--- a/dev.sh
+++ b/dev.sh
@@ -1,29 +1,16 @@
#!/bin/sh
set -e
-VENV="./venv"
-VENV3="${VENV}3"
+PYVERSION=$1
+VENV="venv$1"
-python -m virtualenv $VENV --always-copy
-. $VENV/bin/activate
-pip install -q -U pip setuptools
-pip install -q -r requirements.txt
+echo "Creating dev environment in $VENV using Python $PYVERSION"
+
+python$PYVERSION -m virtualenv "$VENV" --always-copy
+. "$VENV/bin/activate"
+pip$PYVERSION install -q -U pip setuptools
+pip$PYVERSION install -q -r requirements.txt
echo ""
echo "* Virtualenv created in $VENV and all dependencies installed."
echo "* You can now activate the $(python --version) virtualenv with this command: \`. $VENV/bin/activate\`"
-
-if $(python --version 2>&1 | grep -q "Python 2.") && command -v python3 >/dev/null 2>&1; then
- echo ""
- echo ""
-
- python3 -m virtualenv "$VENV3" --always-copy
- . "$VENV3/bin/activate"
- pip install -q -U pip setuptools
- pip install -q -r requirements.txt
-
- echo ""
- echo "* Virtualenv created in $VENV3 and all dependencies installed."
- echo "* You can now activate the $(python --version) virtualenv with this command: \`. $VENV3/bin/activate\`"
-fi
-
diff --git a/web/README b/web/README
index 63c3e6e0..c8e60379 100644
--- a/web/README
+++ b/web/README
@@ -3,4 +3,4 @@ Starting up
- npm install
- gulp
-- run mitmweb and open http://localhost:8081/ \ No newline at end of file
+- run mitmweb and open http://localhost:8081/