Source

fabulator / src / fabulator / core / virtualenv.py

Diff from to

File src/fabulator/core/virtualenv.py

         self.dir = conf.get("dir")
         self.bin_dir = self.dir + os.sep + "bin"
         self.bin = conf.get("bin") or "virtualenv"
-        self.requirements = conf.get("requirements")
+        self.requirements = conf.get("requirements", [])
+        self.requirements_file = conf.get("requirements_file")
     
     def create_virtualenv(self, folder=None, pip=True):
         """creates the virtualenv"""
     def install_pip(self):
         """checks if pip exists or install it using easy_install"""
         if not exists("%s/pip" % self.bin_dir):
-            run("source %s/activate && easy_install pip" % (self.bin_dir))
+            run("%s/easy_install pip" % (self.bin_dir))
 
     def install_requirements(self, use_file=True):
-        if use_file:
-            run("pip install -E %s -r %s" % (self.dir, self.conf.get("requirements-file")))
-        else:
-            for requirement in self.requirements:
-                run("pip install -E %s %s" % (self.dir, requirement))
+        
+        if self.requirements_file:
+            run("%s/pip install -r %s" % (self.bin_dir, self.conf.get("requirements_file")))
+        for requirement in self.requirements:
+            run("%s/pip install %s" % (self.bin_dir, requirement))
         
     def update_requirements(self, use_file=True):
         if use_file:
-            run("pip install -E %s -r %s --upgrade" % (self.dir, self.conf.get("requirements-file")))
+            run("%s/pip install  -r %s --upgrade" % (self.bin_dir, self.conf.get("requirements-file")))
         else:
             for requirement in self.requirements:
-                run("pip install -E %s %s --upgrade" % (self.dir, requirement))
+                run("%s/pip install %s --upgrade" % (self.bin_dir, requirement))
 
     def remove_virtualenv(self):
         run("rm -Rf %s" % self.dir)