sbin/sync/fabfile.py
changeset 641 7d5640606813
parent 632 e85856bfd59b
child 642 b419e891b0bd
--- a/sbin/sync/fabfile.py	Fri May 25 12:55:52 2012 +0200
+++ b/sbin/sync/fabfile.py	Fri May 25 16:33:16 2012 +0200
@@ -99,7 +99,7 @@
 def collectstatic(remotepath, remotevirtualenvpath):
     print("Collect static in %s with %s" % (remotepath, remotevirtualenvpath))
     activate_path = os.path.join(remotevirtualenvpath, "bin/activate")
-    with prefix("source %s" % activate_path), prefix("export PYTHONPATH=\"%s\"" % remotepath), cd(os.path.join(remotepath, env.platform_web_module)):
+    with prefix("source \"%s\"" % activate_path), prefix("export PYTHONPATH=\"%s\"" % remotepath), cd(os.path.join(remotepath, env.platform_web_module)):
         run("python manage.py collectstatic --noinput")
         
         
@@ -116,6 +116,7 @@
 
 def do_create_virtualenv(remote_venv_export_path, remotevirtualenvpath):
     print("Create virtualenv export_path : %s - remote venvpath : %s" % (remote_venv_export_path, remotevirtualenvpath))
+    activate_path = os.path.join(remotevirtualenvpath, "bin/activate")
     if "remote_baseline_venv" in env and env.remote_baseline_venv:
         prefix_str = os.path.join(env.remote_baseline_venv, "bin/activate")
     else:
@@ -123,7 +124,9 @@
     run("mkdir -p \"%s\"" % remotevirtualenvpath)
     with prefix(prefix_str), cd(os.path.join(remote_venv_export_path,"virtualenv","web")):
         run("python create_python_env.py")
-        run("python project-boot.py --unzip-setuptools --no-site-packages --clear --type-install=local \"%s\"" % remotevirtualenvpath)        
+        run("python project-boot.py --unzip-setuptools --no-site-packages --clear --type-install=local \"%s\"" % remotevirtualenvpath)
+    with prefix("source \"%s\"" % activate_path):
+        run("pip install -r \"%s\"" % os.path.join(remote_venv_export_path,"virtualenv","web","res","srvr_requirements.txt"))
 
 def do_sync_ldt(version, export_path):
     print("do_sync_ldt with version %s and path %s" % (version,export_path))