home · contact · privacy
Use "python3 -m venv" instead of "pyvenv".
[url-catcher] / run.sh
1 #!/bin/bash
2
3 # This script runs the url-catcher in a virtual environment with temporarily
4 # installed required external Python libraries.
5 set -e
6
7 DIR_ENV=.temp_env
8
9 pyvenv $DIR_ENV 
10 source $DIR_ENV/bin/activate
11 pip install -r requirements.txt
12 echo
13 set +e
14 uwsgi --socket 127.0.0.1:3031 --wsgi-file url_catcher.py 
15 set -e
16 deactivate
17 rm -rf $DIR_ENV