Discovering plugins via importlib instead of pkg_resources

Hey @cdiener!

Thanks for the heads up, this actually looks like a pretty trivial change to make, we aren't doing that much:

It looks like the new EntryPoint object has basically the same API:

the only real change is entry_point.dist appears to now be metadata(name) but we were only using that to get a name, so we can probably just use the name attribute now.


As an immediate workaround, there is now an add_plugin() method on the plugin manager which you could use to set one up manually, it would look a bit like this:

def _hack_in_the_plugins():
    import qiime2.sdk as sdk
    from importlib_metadata import entry_points
    
    pm = sdk.PluginManager(add_plugins=False)
    for entry in entry_points()["qiime2.plugins"]:
        plugin = entry.load()
        package = entry.value.split(':')[0].split('.')[0]
        pm.add_plugin(plugin, package, entry.name)

_hack_in_the_plugins()

from qiime2.plugins import feature_table  # or however