Namespace 'bitmessage' for plugins entry points
This commit is contained in:
parent
c8a47b988f
commit
b77eb0c7e5
6
setup.py
6
setup.py
|
@ -276,15 +276,15 @@ if __name__ == "__main__":
|
||||||
ext_modules=[bitmsghash],
|
ext_modules=[bitmsghash],
|
||||||
zip_safe=False,
|
zip_safe=False,
|
||||||
entry_points={
|
entry_points={
|
||||||
'gui.menu': [
|
'bitmessage.gui.menu': [
|
||||||
'popMenuYourIdentities.qrcode = '
|
'popMenuYourIdentities.qrcode = '
|
||||||
'pybitmessage.plugins.qrcodeui [qrcode]'
|
'pybitmessage.plugins.qrcodeui [qrcode]'
|
||||||
],
|
],
|
||||||
'notification.message': [
|
'bitmessage.notification.message': [
|
||||||
'notify2 = pybitmessage.plugins.notification_notify2'
|
'notify2 = pybitmessage.plugins.notification_notify2'
|
||||||
'[notify2]'
|
'[notify2]'
|
||||||
],
|
],
|
||||||
'notification.sound': [
|
'bitmessage.notification.sound': [
|
||||||
'file.fallback = pybitmessage.plugins.sound_playfile'
|
'file.fallback = pybitmessage.plugins.sound_playfile'
|
||||||
'[sound]'
|
'[sound]'
|
||||||
],
|
],
|
||||||
|
|
|
@ -9,7 +9,7 @@ def get_plugins(group, point='', name=None, fallback=None):
|
||||||
which name starts with `point` or equals to `name`.
|
which name starts with `point` or equals to `name`.
|
||||||
If `fallback` kwarg specified, plugin with that name yield last.
|
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):
|
if name and ep.name == name or ep.name.startswith(point):
|
||||||
try:
|
try:
|
||||||
plugin = ep.load().connect_plugin
|
plugin = ep.load().connect_plugin
|
||||||
|
|
Loading…
Reference in New Issue
Block a user