def install(self, *requirements): try: self.working_set.require(*requirements) except pkg_resources.ResolutionError: pass else: return # `--prefer-binary` guards against race conditions when installation # occurs while packages are in the process of being published. call(self.pip_path, "install", "--prefer-binary", *requirements)
def install_requirements(self, requirements_path): with open(requirements_path) as f: try: self.working_set.require(f.read()) except Exception: pass else: return # `--prefer-binary` guards against race conditions when installation # occurs while packages are in the process of being published. call(self.pip_path, "install", "--prefer-binary", "-r", requirements_path)
def install_requirements(self, requirements_path): with open(requirements_path) as f: try: self.working_set.require(f.read()) except Exception: pass else: return # `--prefer-binary` guards against race conditions when installation # occurs while packages are in the process of being published. call( self.pip_path, "install", "--prefer-binary", "-r", requirements_path )
def install_requirements(self, requirements_path): call(self.pip_path, "install", "-r", requirements_path)
def install(self, *requirements): call(self.pip_path, "install", *requirements)
def create(self): if os.path.exists(self.path): shutil.rmtree(self.path) call(self.virtualenv, self.path, "-p", sys.executable)
def install_requirements(self, requirements_path): # `--prefer-binary` guards against race conditions when installation # occurs while packages are in the process of being published. call(self.pip_path, "install", "--prefer-binary", "-r", requirements_path)
def create(self): if os.path.exists(self.path): shutil.rmtree(self.path) call(self.virtualenv, self.path)
def create(self): if os.path.exists(self.path): shutil.rmtree(self.path) self._working_set = None call(self.virtualenv, self.path, "-p", sys.executable)