diff --git a/README.md b/README.md index a912fbb67b195dfcc750ac477ccae5975cdd307f..cb74dde3bba5dc42bf90e1d228817b322cc52ec1 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,9 @@ To run locally (for testing purposes): -- Install proxychains, configure it for Tor +- Install virtualenv and Python 2.7 + +- (Optional) Install proxychains, configure it for Tor - Pull in the dependencies: @@ -21,9 +23,13 @@ To run locally (for testing purposes): - Start the webserver: ``` + $ source env/bin/activate # activates virtualenv $ ./runserver.py + $ deactivate # ..s virtualenv ``` + (if the shell in use is not bash, you can append its name to the activator if supported: `...ivate.fish`) + - Open the site at http://localhost:5000/ ## Running a mirror diff --git a/etc/project.vars b/etc/project.vars index da768a33f72a9362edd2df0e3069ef165de37bcf..b8c3ff77964a9c2d83a8ab82f7b134d26fc5cb26 100644 --- a/etc/project.vars +++ b/etc/project.vars @@ -1,2 +1,7 @@ export venv_dir="env" -export venv="`which virtualenv-2.7 || which virtualenv`" +export spec="" +export venv="`which virtualenv-2.7`" +if [ x"$venv" = x ]; then + export venv="`which virtualenv`" + export spec="-p 2.7" +fi diff --git a/setup_venv.sh b/setup_venv.sh index 9b3b3a40bd16c7fe9f9336ab0e924210f4c39d34..425e3bf8478bbd8fc10e7929d37076db9a80c46b 100755 --- a/setup_venv.sh +++ b/setup_venv.sh @@ -7,7 +7,7 @@ if [ ! $venv ]; then exit 1 else if [ ! -d $venv_dir ] ; then - $venv --distribute $venv_dir + $venv $spec $venv_dir fi . $venv_dir/bin/activate