def resolve_dependencies(self, install=True): """ Install any tool dependencies. If the optional 'install' parameter is False, only check if the dependencies are installed but do not try to install them. """ print "Resolving dependencies for %s..." % str(self.tool_env['pkg_name']).upper() ret_env = {} parent_env = {'parent': self.tool_env} d = shogun(self.conf) if d.is_installed(parent_env): ret_env = d.get_env(parent_env) elif install: ret_env = d.install(parent_env) else: # Not installed, not installing, but checking if it were installed return False if ret_env.has_key('env_script'): self.tool_env['shogun_env_script'] = ret_env['env_script'] else: print "----- ERROR: Could not install Shogun -----" return False parent_env = {'parent': self.tool_env} # Reset parent_env d = weblogo(self.conf) if d.is_installed(parent_env): ret_env = d.get_env(parent_env) elif install: ret_env = d.install(parent_env) else: # Not installed, not installing, but checking if it were installed return False if not ret_env['installed']: return False self.tool_env['dependencies_ok'] = True return True
def resolve_dependencies(self, install=True): """Check if tool dependencies are installed. If the optional 'install' parameter is True, try to install any missing dependencies.""" print "Resolving dependencies for %s..." % str( self.tool_env['pkg_name']).upper() ret_env = {} parent_env = {'parent': self.tool_env} d = shogun(self.conf) if d.is_installed(parent_env): ret_env = d.get_env(parent_env) elif install: ret_env = d.install(parent_env) else: # Not installed, not installing, but checking if it were installed return False if ret_env.has_key('env_script'): self.tool_env['shogun_env_script'] = ret_env['env_script'] else: print "----- ERROR: Could not install Shogun -----" return False self.tool_env['dependencies_ok'] = True return True
def resolve_dependencies(self, install=True): """Check if tool dependencies are installed. If the optional 'install' parameter is True, try to install any missing dependencies.""" print "Resolving dependencies for %s..." % self.tool_env['pkg_name'] if not self.install_arff(): print "ERROR: Could not install ARFF" return False parent_env = {'parent': self.tool_env} ret_env = {} d = shogun(self.conf) if d.is_installed(parent_env): ret_env = d.get_env(parent_env) elif install: ret_env = d.install(parent_env) else: # Not installed, not installing, but checking if it were installed return False if ret_env.has_key('env_script'): self.tool_env['shogun_env_script'] = ret_env['env_script'] else: print "----- ERROR: Could not install Shogun -----" return False self.tool_env['dependencies_ok'] = True return True