From ead8d8353603784aa88eef9a139c2b19a8846340 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Mon, 12 Oct 2009 16:43:18 +0200 Subject: [PATCH] =?utf8?q?Wydzielenie=20=C5=9Bcie=C5=BCek=20do=20python,?= =?utf8?q?=20virtualenv=20i=20pip=20do=20zmiennych=20w=20env.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- fabfile.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) 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" -- 2.20.1