[Distutils] entry_points.txt survey

PJ Eby pje at telecommunity.com
Fri May 25 05:40:05 CEST 2012


On Thu, May 24, 2012 at 8:48 PM, Daniel Holth <dholth at gmail.com> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20120524/8dfa517f/attachment-0001.html>


More information about the Distutils-SIG mailing list