entry_points.txt survey
From a survey of 16984 pypi source distributions (the newest for each
It looks like you can call pkg_resources.register_finder() with a 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. package surveyed), 5878 define entry_points.txt but 1399 of those are empty. Some of the most popular sections are: (10, 'babel.extractors'), (10, 'lava_server.extensions'), (10, 'paste.composite_factory'), (10, 'turbogears.extensions'), (10, 'yafowil.plugin'), (10, 'zest.releaser.prereleaser.middle'), (11, 'chandler.parcels'), (11, 'rsl.register'), (12, 'hurry.resource.libraries'), (15, 'paste.global_paster_command'), (16, 'pyramid.scaffold'), (17, 'zc.buildout.uninstall'), (18, 'paste.server_runner'), (18, 'setuptools.installation'), (19, 'python.templating.engines'), (20, 'redsolutioncms'), (20, 'zope2.initialize'), (22, 'pytest11'), (23, 'setuptools.file_finders'), (26, 'paste.paster_command'), (30, 'nose.plugins'), (31, 'paste.filter_factory'), (31, 'zc.buildout.extension'), (35, 'toscawidgets.widgets'), (35, 'turbogears.widgets'), (37, 'tw2.widgets'), (47, 'paste.app_install'), (69, 'nose.plugins.0.10'), (73, 'distutils.commands'), (81, 'trytond.modules'), (82, 'gui_scripts'), (83, 'paste.filter_app_factory'), (94, 'fanstatic.libraries'), (96, 'trac.plugins'), (110, 'egg_info.writers'), (120, 'distutils.setup_keywords'), (144, 'paste.paster_create_template'), (190, 'paste.app_factory'), (354, 'zc.buildout'), (1004, 'z3c.autoinclude.plugin'), (1754, 'console_scripts')
On Thu, May 24, 2012 at 8:48 PM, Daniel Holth <dholth@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.
participants (2)
-
Daniel Holth -
PJ Eby