From b9a8bf2409dd91bb5dc7296aba0c225e0695cb74 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Fri, 10 Dec 2010 04:09:25 +0000 Subject: [PATCH] Ported the Label plugin to the deluge.plugins namespace. --- deluge/plugins/{label => Label}/TODO | 0 deluge/plugins/Label/deluge/__init__.py | 3 +++ deluge/plugins/Label/deluge/plugins/__init__.py | 3 +++ .../deluge/plugins}/label/__init__.py | 0 .../{label => Label/deluge/plugins}/label/core.py | 0 .../deluge/plugins}/label/data/label.js | 0 .../deluge/plugins}/label/data/label_options.glade | 0 .../deluge/plugins}/label/data/label_pref.glade | 0 .../deluge/plugins}/label/gtkui/__init__.py | 0 .../deluge/plugins}/label/gtkui/label_config.py | 0 .../deluge/plugins}/label/gtkui/sidebar_menu.py | 0 .../deluge/plugins}/label/gtkui/submenu.py | 0 .../{label => Label/deluge/plugins}/label/test.py | 0 .../{label => Label/deluge/plugins}/label/webui.py | 3 ++- deluge/plugins/{label => Label}/setup.py | 13 +++++++------ 15 files changed, 15 insertions(+), 7 deletions(-) rename deluge/plugins/{label => Label}/TODO (100%) create mode 100644 deluge/plugins/Label/deluge/__init__.py create mode 100644 deluge/plugins/Label/deluge/plugins/__init__.py rename deluge/plugins/{label => Label/deluge/plugins}/label/__init__.py (100%) rename deluge/plugins/{label => Label/deluge/plugins}/label/core.py (100%) rename deluge/plugins/{label => Label/deluge/plugins}/label/data/label.js (100%) rename deluge/plugins/{label => Label/deluge/plugins}/label/data/label_options.glade (100%) rename deluge/plugins/{label => Label/deluge/plugins}/label/data/label_pref.glade (100%) rename deluge/plugins/{label => Label/deluge/plugins}/label/gtkui/__init__.py (100%) rename deluge/plugins/{label => Label/deluge/plugins}/label/gtkui/label_config.py (100%) rename deluge/plugins/{label => Label/deluge/plugins}/label/gtkui/sidebar_menu.py (100%) rename deluge/plugins/{label => Label/deluge/plugins}/label/gtkui/submenu.py (100%) rename deluge/plugins/{label => Label/deluge/plugins}/label/test.py (100%) rename deluge/plugins/{label => Label/deluge/plugins}/label/webui.py (93%) rename deluge/plugins/{label => Label}/setup.py (86%) diff --git a/deluge/plugins/label/TODO b/deluge/plugins/Label/TODO similarity index 100% rename from deluge/plugins/label/TODO rename to deluge/plugins/Label/TODO diff --git a/deluge/plugins/Label/deluge/__init__.py b/deluge/plugins/Label/deluge/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Label/deluge/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/Label/deluge/plugins/__init__.py b/deluge/plugins/Label/deluge/plugins/__init__.py new file mode 100644 index 000000000..94033e829 --- /dev/null +++ b/deluge/plugins/Label/deluge/plugins/__init__.py @@ -0,0 +1,3 @@ +# this is a namespace package +import pkg_resources +pkg_resources.declare_namespace(__name__) diff --git a/deluge/plugins/label/label/__init__.py b/deluge/plugins/Label/deluge/plugins/label/__init__.py similarity index 100% rename from deluge/plugins/label/label/__init__.py rename to deluge/plugins/Label/deluge/plugins/label/__init__.py diff --git a/deluge/plugins/label/label/core.py b/deluge/plugins/Label/deluge/plugins/label/core.py similarity index 100% rename from deluge/plugins/label/label/core.py rename to deluge/plugins/Label/deluge/plugins/label/core.py diff --git a/deluge/plugins/label/label/data/label.js b/deluge/plugins/Label/deluge/plugins/label/data/label.js similarity index 100% rename from deluge/plugins/label/label/data/label.js rename to deluge/plugins/Label/deluge/plugins/label/data/label.js diff --git a/deluge/plugins/label/label/data/label_options.glade b/deluge/plugins/Label/deluge/plugins/label/data/label_options.glade similarity index 100% rename from deluge/plugins/label/label/data/label_options.glade rename to deluge/plugins/Label/deluge/plugins/label/data/label_options.glade diff --git a/deluge/plugins/label/label/data/label_pref.glade b/deluge/plugins/Label/deluge/plugins/label/data/label_pref.glade similarity index 100% rename from deluge/plugins/label/label/data/label_pref.glade rename to deluge/plugins/Label/deluge/plugins/label/data/label_pref.glade diff --git a/deluge/plugins/label/label/gtkui/__init__.py b/deluge/plugins/Label/deluge/plugins/label/gtkui/__init__.py similarity index 100% rename from deluge/plugins/label/label/gtkui/__init__.py rename to deluge/plugins/Label/deluge/plugins/label/gtkui/__init__.py diff --git a/deluge/plugins/label/label/gtkui/label_config.py b/deluge/plugins/Label/deluge/plugins/label/gtkui/label_config.py similarity index 100% rename from deluge/plugins/label/label/gtkui/label_config.py rename to deluge/plugins/Label/deluge/plugins/label/gtkui/label_config.py diff --git a/deluge/plugins/label/label/gtkui/sidebar_menu.py b/deluge/plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py similarity index 100% rename from deluge/plugins/label/label/gtkui/sidebar_menu.py rename to deluge/plugins/Label/deluge/plugins/label/gtkui/sidebar_menu.py diff --git a/deluge/plugins/label/label/gtkui/submenu.py b/deluge/plugins/Label/deluge/plugins/label/gtkui/submenu.py similarity index 100% rename from deluge/plugins/label/label/gtkui/submenu.py rename to deluge/plugins/Label/deluge/plugins/label/gtkui/submenu.py diff --git a/deluge/plugins/label/label/test.py b/deluge/plugins/Label/deluge/plugins/label/test.py similarity index 100% rename from deluge/plugins/label/label/test.py rename to deluge/plugins/Label/deluge/plugins/label/test.py diff --git a/deluge/plugins/label/label/webui.py b/deluge/plugins/Label/deluge/plugins/label/webui.py similarity index 93% rename from deluge/plugins/label/label/webui.py rename to deluge/plugins/Label/deluge/plugins/label/webui.py index bfc495307..59ed7af99 100644 --- a/deluge/plugins/label/label/webui.py +++ b/deluge/plugins/Label/deluge/plugins/label/webui.py @@ -46,7 +46,8 @@ from deluge.plugins.pluginbase import WebPluginBase from deluge import component def get_resource(filename): - return pkg_resources.resource_filename("label", os.path.join("data", filename)) + return pkg_resources.resource_filename("deluge.plugins.label", + os.path.join("data", filename)) class WebUI(WebPluginBase): diff --git a/deluge/plugins/label/setup.py b/deluge/plugins/Label/setup.py similarity index 86% rename from deluge/plugins/label/setup.py rename to deluge/plugins/Label/setup.py index 4fc344484..ef710fc25 100644 --- a/deluge/plugins/label/setup.py +++ b/deluge/plugins/Label/setup.py @@ -31,7 +31,7 @@ # -from setuptools import setup +from setuptools import setup, find_packages __plugin_name__ = "Label" __author__ = "Martijn Voncken" @@ -49,7 +49,7 @@ adds a tracker column. future: Real labels. """ -__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]} +__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): ["template/*", "data/*"]} setup( name=__plugin_name__, @@ -61,15 +61,16 @@ setup( license=__license__, long_description=__long_description__, - packages=[__plugin_name__.lower(), "label.gtkui"], + packages=find_packages(), + namespace_packages = ["deluge", "deluge.plugins"], package_data = __pkg_data__, entry_points=""" [deluge.plugin.core] - %s = %s:CorePlugin + %s = deluge.plugins.%s:CorePlugin [deluge.plugin.gtkui] - %s = %s:GtkUIPlugin + %s = deluge.plugins.%s:GtkUIPlugin [deluge.plugin.web] - %s = %s:WebUIPlugin + %s = deluge.plugins.%s:WebUIPlugin """ % ((__plugin_name__, __plugin_name__.lower())*3) )