Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Move virtual environments to user's home directory

They're becoming a pain in the project directory and not being
differentiated between host and guest. The other option was to keep them
in the project directory but use the OS name in the path.
  • Loading branch information...
commit 007ce681c21bc160f56a04acbaad00a86a44c985 1 parent efd8a1a
@robyoung robyoung authored
Showing with 8 additions and 9 deletions.
  1. +0 −1  .gitignore
  2. +1 −1  pep-it.sh
  3. +3 −3 run_tests.sh
  4. +4 −4 start-app.sh
View
1  .gitignore
@@ -4,5 +4,4 @@ tokens.dat
assets/*
!assets/.gitkeep
.idea
-venv
*.tar.gz
View
2  pep-it.sh
@@ -1,4 +1,4 @@
#!/bin/bash
basedir=$(dirname $0)
-pep8 --ignore=E201,E202,E251 --exclude=venv,collectors "$basedir"
+pep8 --ignore=E201,E202,E251 --exclude=collectors "$basedir"
View
6 run_tests.sh
@@ -17,11 +17,11 @@ function display_result {
fi
}
-basedir=$(dirname $0)
+venvdir=~/.virtualenvs/$(basename $(cd $(dirname $0) && pwd -P))
-virtualenv --no-site-packages "$basedir/venv"
+virtualenv --no-site-packages "$venvdir"
-source "$basedir/venv/bin/activate"
+source "$venvdir/bin/activate"
pip install -r requirements.txt
pip install -r requirements_for_tests.txt
View
8 start-app.sh
@@ -1,11 +1,11 @@
#!/bin/bash
-basedir=$(dirname $0)
+venvdir=~/.virtualenvs/$(basename $(cd $(dirname $0) && pwd -P))
-virtualenv --no-site-packages "$basedir/venv"
+virtualenv --no-site-packages "$venvdir"
-source "$basedir/venv/bin/activate"
+source "$venvdir/bin/activate"
pip install -r requirements.txt
-$basedir/venv/bin/python start.py $1 $2
+python start.py $1 $2
Please sign in to comment.
Something went wrong with that request. Please try again.