From b77eb0c7e57a41917284a35d68caae0d987fadeb Mon Sep 17 00:00:00 2001 From: Dmitri Bogomolov <4glitch@gmail.com> Date: Fri, 24 Mar 2017 14:31:27 +0200 Subject: [PATCH] Namespace 'bitmessage' for plugins entry points --- setup.py | 6 +++--- src/plugins/plugin.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index eb79c3b7..06d49ba5 100644 --- a/setup.py +++ b/setup.py @@ -276,15 +276,15 @@ if __name__ == "__main__": ext_modules=[bitmsghash], zip_safe=False, entry_points={ - 'gui.menu': [ + 'bitmessage.gui.menu': [ 'popMenuYourIdentities.qrcode = ' 'pybitmessage.plugins.qrcodeui [qrcode]' ], - 'notification.message': [ + 'bitmessage.notification.message': [ 'notify2 = pybitmessage.plugins.notification_notify2' '[notify2]' ], - 'notification.sound': [ + 'bitmessage.notification.sound': [ 'file.fallback = pybitmessage.plugins.sound_playfile' '[sound]' ], diff --git a/src/plugins/plugin.py b/src/plugins/plugin.py index ba14b836..6601adaf 100644 --- a/src/plugins/plugin.py +++ b/src/plugins/plugin.py @@ -9,7 +9,7 @@ def get_plugins(group, point='', name=None, fallback=None): which name starts with `point` or equals to `name`. If `fallback` kwarg specified, plugin with that name yield last. """ - for ep in pkg_resources.iter_entry_points(group): + for ep in pkg_resources.iter_entry_points('bitmessage.' + group): if name and ep.name == name or ep.name.startswith(point): try: plugin = ep.load().connect_plugin