IPluginLocator¶
Role¶
IPluginLocator
defines the basic interface expected by a
PluginManager
to be able to locate plugins and get basic info
about each discovered plugin (name, version etc).
API¶
- class yapsy.IPluginLocator.IPluginLocator¶
Plugin Locator interface with some methods already implemented to manage the awkward backward compatible stuff.
- gatherCorePluginInfo(directory, filename)¶
Return a
PluginInfo
as well as theConfigParser
used to build it.If filename is a valid plugin discovered by any of the known strategy in use. Returns None,None otherwise.
- getPluginInfoClass()¶
DEPRECATED(>1.9): kept for backward compatibility with existing PluginManager child classes.
Get the class that holds PluginInfo.
- getPluginNameAndModuleFromStream(fileobj)¶
DEPRECATED(>1.9): kept for backward compatibility with existing PluginManager child classes.
Return a 3-uple with the name of the plugin, its module and the config_parser used to gather the core data in a tuple, if the required info could be localised, else return
(None,None,None)
.
- locatePlugins()¶
Walk through the plugins’ places and look for plugins.
Return the discovered plugins as a list of
(candidate_infofile_path, candidate_file_path,plugin_info_instance)
and their number.
- setPluginInfoClass(picls, names=None)¶
DEPRECATED(>1.9): kept for backward compatibility with existing PluginManager child classes.
Set the class that holds PluginInfo. The class should inherit from
PluginInfo
.
- setPluginPlaces(directories_list)¶
DEPRECATED(>1.9): kept for backward compatibility with existing PluginManager child classes.
Set the list of directories where to look for plugin places.
- updatePluginPlaces(directories_list)¶
DEPRECATED(>1.9): kept for backward compatibility with existing PluginManager child classes.
Updates the list of directories where to look for plugin places.