From ffe377758219d2500806c0807c6e902be8eba4fb Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=81ukasz=20Rekucki?= Date: Sun, 11 Apr 2010 22:01:33 +0200 Subject: [PATCH] Require PIL. --- fabfile.py | 16 ++++++++++++---- platforma/config/requirements.txt | 1 + 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/fabfile.py b/fabfile.py index b132b9dd..399f1c2f 100644 --- a/fabfile.py +++ b/fabfile.py @@ -61,18 +61,26 @@ def setup(): """ require('hosts', 'sandbox', provided_by=[staging, production]) - run("mkdir -p %(path)s; mkdir -p %(path)s/www/wsgi;" % env) + run("mkdir -p %(path)s; mkdir -p %(path)s/www/wsgi; mkdir -p %(path)s/www/media" % env) # make a git mirror - run("""\ -cd %(path)s; + run("""cd %(path)s; git clone %(giturl)s mirror; cd %(path)s/mirror; git pull""" % env, pty=True) run('%(virtualenv)s %(path)s' % env, pty=True) - run('cd %(path)s; mkdir -p releases; mkdir -p shared; mkdir -p packages;' % env, pty=True) + run('cd %(path)s; rm -rf releases shared packages; mkdir -p releases; mkdir -p shared; mkdir -p packages;' % env, pty=True) + + # symlink static content + run("""cd %(path)s/www/media; +ln -sf %(path)s/releases/current/%(project_name)s/static static +ln -sf %(path)s/lib/python2.6/site-packages/django/contrib/admin/media admin-media +mkdir -p dynamic +""" % env) + run('cd %(path)s/releases; ln -s . current; ln -s . previous' % env, pty=True) + deploy() diff --git a/platforma/config/requirements.txt b/platforma/config/requirements.txt index 081792d8..d247c761 100644 --- a/platforma/config/requirements.txt +++ b/platforma/config/requirements.txt @@ -2,6 +2,7 @@ lxml>=2.2 mercurial>=1.3.1 PyYAML>=3.0 +PIL>=1.1 ## Book conversion library git+git://github.com/fnp/librarian.git@master#egg=librarian -- 2.20.1