On Thu, May 24, 2012 at 8:48 PM, Daniel Holth <[email protected]> wrote:
> It looks like you can call pkg_resources.register_finder() with a > Ah, *that* plugin facility. I thought you were talking about something specific to entry points (a mechanism which doesn't exist, at least in setuptools), vs. implementing your own metadata/resource handlers for a specific distribution type. (Which is an intended extensibility mechanism for specialized importer metadata in general.) > function that also yields distributions with a .dist-info directory > (though you would have to override the existing find_on_path). From > there I think pkg_resources.load_entry_point() is likely to work. > Yes, you would need to implement a metadata handler (probably subclassing PathMetadata) for your finder to provide, and you'd need to delegate to the existing find_on_path(). Your metadata handler would need to translate requests for PKG-INFO and other setuptools metadata, so it would need to override get_metadata(). I was planning to do something like this in setuptools eventually, but as you point out, it's quite possible to do it in a separate piece of code, albeit some rather monkeypatching-like code.
_______________________________________________ Distutils-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/distutils-sig
