[prev in list] [next in list] [prev in thread] [next in thread]
List: python-distutils-sig
Subject: [Distutils] setuptools: Plugins
From: pje () telecommunity ! com (Phillip J ! Eby)
Date: 2005-08-22 18:48:53
Message-ID: 5.1.1.6.0.20050822144347.01b0cc60 () mail ! telecommunity ! com
[Download RAW message or body]
At 01:29 PM 8/22/2005 -0500, Ian Bicking wrote:
>I'm looking for some advice on using setuptools/eggs/entry_points for
>plugins. Specifically, how do I find distributions tht provide the
>entry points I'm interested in? For instance, can I find all the
>distributions that provide "paste.script_command" entry points? Or does
>there need to be some way for these distributions to tell my package
>they exist?
def distributions_with_commands(ws=pkg_resources.working_set):
for dist in ws:
if dist.get_entry_map('paste.script_command'):
yield dist
Distribution.get_entry_map() returns a dictionary mapping entry point names
to EntryPoint objects, so this code yields the distributions on sys.path
(by default) that contain any entry points in the 'paste.script_command' group.
Complete documentation on the entry point API can be found at:
http://peak.telecommunity.com/DevCenter/PkgResources#entry-points
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic