-def copy_localsettings():
- "Copy localsettings.py from root directory to release directory (if this file exists)"
- print ">>> copy localsettings"
- require('release', provided_by = [deploy])
- require('path', provided_by = [staging, production])
+ print '>>> Instaling global requirements'
+ require('release', provided_by=[deploy])
+ run('cd %(path)s; %(path)s/bin/pip install -r %(path)s/releases/%(release)s/%(project_name)s/config/requirements.txt' % env, pty=True)
+
+ print '>>> Instaling site requirements'
+
+ with settings(warn_only=True):
+ run('cd %(path)s; %(path)s/bin/pip install -r %(sandbox)s/etc/%(project_name)s/requirements.txt' % env, pty=True)
+
+
+def hardlink_localsettings():
+ "Hardlink localsettings.py from root directory to release directory (if this file exists)"
+ print ">>> Hardlink localsettings"
+ require('release', 'path', provided_by=[deploy])
+ require('sandbox', provided_by=[staging, production])
+
+ # hardlink localsettings
+ with settings(warn_only=True):
+ run('ln %(sandbox)s/etc/%(project_name)s/localsettings.py %(path)s/releases/%(release)s/%(project_name)s' % env)