forked from I2P_Developers/i2p.www
fix virtualenv setup
This commit is contained in:
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Reference in New Issue
Block a user