def command(self): self.exclude_modules = self.options.exclude_modules or [] self.add_types = self.options.add_types or [] self.symbol = self.args[0] self.basedir = os.path.dirname( pluginlib.find_egg_info_dir(os.getcwd())) if self.verbose: print "Searching in %s" % self.basedir self.total_files = 0 self.search_dir(self.basedir) if self.verbose > 1: print "Searched %i files" % self.total_files
def command(self): self.exclude_modules = self.options.exclude_modules or [] self.add_types = self.options.add_types or [] self.symbol = self.args[0] self.basedir = os.path.dirname(pluginlib.find_egg_info_dir( os.getcwd())) if self.verbose: print "Searching in %s" % self.basedir self.total_files = 0 self.search_dir(self.basedir) if self.verbose > 1: print "Searched %i files" % self.total_files
def get_commands(): plugins = system_plugins[:] egg_info_dir = pluginlib.find_egg_info_dir(os.getcwd()) if egg_info_dir: plugins.append(os.path.splitext(os.path.basename(egg_info_dir))[0]) base_dir = os.path.dirname(egg_info_dir) if base_dir not in sys.path: sys.path.insert(0, base_dir) pkg_resources.working_set.add_entry(base_dir) plugins = pluginlib.resolve_plugins(plugins) commands = pluginlib.load_commands_from_plugins(plugins) commands.update(pluginlib.load_global_commands()) return commands