fix virtualenv setup

This commit is contained in:
2023-03-18 17:25:20 +00:00
committed by idk
parent 2f768fd6d2
commit f544a40229
3 changed files with 14 additions and 3 deletions

View File

@ -2,7 +2,9 @@
To run locally (for testing purposes): 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: - Pull in the dependencies:
@ -21,9 +23,13 @@ To run locally (for testing purposes):
- Start the webserver: - Start the webserver:
``` ```
$ source env/bin/activate # activates virtualenv
$ ./runserver.py $ ./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/ - Open the site at http://localhost:5000/
## Running a mirror ## Running a mirror

View File

@ -1,2 +1,7 @@
export venv_dir="env" 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

View File

@ -7,7 +7,7 @@ if [ ! $venv ]; then
exit 1 exit 1
else else
if [ ! -d $venv_dir ] ; then if [ ! -d $venv_dir ] ; then
$venv --distribute $venv_dir $venv $spec $venv_dir
fi fi
. $venv_dir/bin/activate . $venv_dir/bin/activate