From: Marek Stępniowski Date: Mon, 12 Oct 2009 14:43:18 +0000 (+0200) Subject: Wydzielenie ścieżek do python, virtualenv i pip do zmiennych w env. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/ead8d8353603784aa88eef9a139c2b19a8846340?ds=inline;hp=-c Wydzielenie ścieżek do python, virtualenv i pip do zmiennych w env. --- ead8d8353603784aa88eef9a139c2b19a8846340 diff --git a/fabfile.py b/fabfile.py index 2acd88bba..e4033209b 100644 --- a/fabfile.py +++ b/fabfile.py @@ -14,12 +14,17 @@ def staging(): """Use staging server""" env.hosts = ['zuber@stigma.nowoczesnapolska.org.pl:2222'] env.path = '/var/lektury' + env.python = '/usr/bin/python' + env.virtualenv = '/usr/bin/virtualenv' + env.pip = '/usr/bin/pip' def production(): """Use production server""" - env.hosts = ['fundacja@wolnelektury:22123'] + env.hosts = ['fundacja@wolnelektury.pl:22123'] env.path = '/opt/lektury' - + env.python = '/opt/lektury/basevirtualenv/bin/python' + env.virtualenv = '/opt/lektury/basevirtualenv/bin/virtualenv' + env.pip = '/opt/lektury/basevirtualenv/bin/pip' # ========= # = Tasks = @@ -27,7 +32,7 @@ def production(): def test(): "Run the test suite and bail out if it fails" require('hosts', 'path', provided_by=[staging, production]) - result = run('cd %(path)s/%(project_name)s; python manage.py test' % env) + result = run('cd %(path)s/%(project_name)s; %(python)s manage.py test' % env) def deploy(): """ @@ -127,8 +132,8 @@ def install_requirements(): print '>>> install requirements' require('release', provided_by=[deploy]) with cd('%(path)s/releases/%(release)s' % env): - run('virtualenv --no-site-packages .') - run('pip install -E . requirements.pybundle') + run('%(virtualenv)s --no-site-packages .' % env) + run('%(pip)s install -E . requirements.pybundle' % env) def symlink_current_release(): "Symlink our current release"