From edd3ce9addf77ecec4f84d4f025b559d1a722c7d Mon Sep 17 00:00:00 2001 From: Alexander Kojevnikov Date: Thu, 17 Apr 2014 11:15:06 -0700 Subject: [PATCH] Use virtualenv --- .gitignore | 1 + README.md | 7 ++++--- requirements.txt | 2 ++ run-uwsgi | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore index d06d950..697e92d 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ covers db/muspy.bak db/muspy.db* +env diff --git a/README.md b/README.md index 32c58b4..d190162 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,11 @@ ## Development -To set up development environment you need to install these dependencies: +To set up development environment you need to install nginx and virtualenv, then run: -* On FreeBSD: `portmaster databases/sqlite3 graphics/py-imaging www/nginx www/py-django www/py-django-piston` -* On Debian: `aptitude install sqlite3 python-imaging nginx python-django python-django-piston` + % virtualenv env + % source env/bin/activate + % pip install -r requirements.txt Edit your main `nginx.conf`: diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e784201 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +django>=1.3,<1.4 +django-piston==0.2.3 diff --git a/run-uwsgi b/run-uwsgi index 06bbc9d..7881b02 100755 --- a/run-uwsgi +++ b/run-uwsgi @@ -7,6 +7,7 @@ cd $DIR exec setuidgid www /usr/local/bin/uwsgi \ --socket=/tmp/muspy.sock \ --pythonpath="$DIR" \ + --home=env \ --master \ --processes=6 \ --harakiri=30 \