Module: deluge
Branch: master
Commit: b0d77a4f2032848cdfa321a1c0b36f13f76e0937

Author: Pedro Algarvio <[email protected]>
Date:   Fri Dec 10 00:35:51 2010 +0000

Ported the Extractor plugin to the plugins namespace.

---

 deluge/plugins/Extractor/deluge/__init__.py        |    3 +++
 .../plugins/Extractor/deluge/plugins/__init__.py   |    3 +++
 .../deluge/plugins}/extractor/__init__.py          |    0
 .../deluge/plugins}/extractor/common.py            |    3 ++-
 .../deluge/plugins}/extractor/core.py              |    0
 .../plugins}/extractor/data/extractor_prefs.glade  |    0
 .../deluge/plugins}/extractor/gtkui.py             |    0
 .../deluge/plugins}/extractor/webui.py             |    0
 deluge/plugins/{extractor => Extractor}/setup.py   |   13 +++++++------
 9 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/deluge/plugins/Extractor/deluge/__init__.py 
b/deluge/plugins/Extractor/deluge/__init__.py
new file mode 100644
index 0000000..94033e8
--- /dev/null
+++ b/deluge/plugins/Extractor/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/Extractor/deluge/plugins/__init__.py 
b/deluge/plugins/Extractor/deluge/plugins/__init__.py
new file mode 100644
index 0000000..94033e8
--- /dev/null
+++ b/deluge/plugins/Extractor/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/extractor/extractor/__init__.py 
b/deluge/plugins/Extractor/deluge/plugins/extractor/__init__.py
similarity index 100%
rename from deluge/plugins/extractor/extractor/__init__.py
rename to deluge/plugins/Extractor/deluge/plugins/extractor/__init__.py
diff --git a/deluge/plugins/extractor/extractor/common.py 
b/deluge/plugins/Extractor/deluge/plugins/extractor/common.py
similarity index 90%
rename from deluge/plugins/extractor/extractor/common.py
rename to deluge/plugins/Extractor/deluge/plugins/extractor/common.py
index 66175e8..0517f41 100644
--- a/deluge/plugins/extractor/extractor/common.py
+++ b/deluge/plugins/Extractor/deluge/plugins/extractor/common.py
@@ -35,4 +35,5 @@
 
 def get_resource(filename):
     import pkg_resources, os
-    return pkg_resources.resource_filename("extractor", os.path.join("data", 
filename))
+    return pkg_resources.resource_filename("deluge.plugins.extractor",
+                                           os.path.join("data", filename))
diff --git a/deluge/plugins/extractor/extractor/core.py 
b/deluge/plugins/Extractor/deluge/plugins/extractor/core.py
similarity index 100%
rename from deluge/plugins/extractor/extractor/core.py
rename to deluge/plugins/Extractor/deluge/plugins/extractor/core.py
diff --git a/deluge/plugins/extractor/extractor/data/extractor_prefs.glade 
b/deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor_prefs.glade
similarity index 100%
rename from deluge/plugins/extractor/extractor/data/extractor_prefs.glade
rename to 
deluge/plugins/Extractor/deluge/plugins/extractor/data/extractor_prefs.glade
diff --git a/deluge/plugins/extractor/extractor/gtkui.py 
b/deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py
similarity index 100%
rename from deluge/plugins/extractor/extractor/gtkui.py
rename to deluge/plugins/Extractor/deluge/plugins/extractor/gtkui.py
diff --git a/deluge/plugins/extractor/extractor/webui.py 
b/deluge/plugins/Extractor/deluge/plugins/extractor/webui.py
similarity index 100%
rename from deluge/plugins/extractor/extractor/webui.py
rename to deluge/plugins/Extractor/deluge/plugins/extractor/webui.py
diff --git a/deluge/plugins/extractor/setup.py 
b/deluge/plugins/Extractor/setup.py
similarity index 87%
rename from deluge/plugins/extractor/setup.py
rename to deluge/plugins/Extractor/setup.py
index 7f3afe9..135d698 100644
--- a/deluge/plugins/extractor/setup.py
+++ b/deluge/plugins/Extractor/setup.py
@@ -37,7 +37,7 @@
 #
 #
 
-from setuptools import setup
+from setuptools import setup, find_packages
 
 __plugin_name__ = "Extractor"
 __author__ = "Andrew Resch"
@@ -47,7 +47,7 @@ __url__ = "http://deluge-torrent.org";
 __license__ = "GPLv3"
 __description__ = "Extract files upon completion"
 __long_description__ = """"""
-__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]}
+__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): ["template/*", 
"data/*"]}
 
 setup(
     name=__plugin_name__,
@@ -59,15 +59,16 @@ setup(
     license=__license__,
     long_description=__long_description__ if __long_description__ else 
__description__,
 
-    packages=[__plugin_name__.lower()],
+    packages=find_packages(),
+    namespace_packages = ["deluge", "deluge.plugins"],
     package_data = __pkg_data__,
 
     entry_points="""
     [deluge.plugin.core]
-    %s = %s:CorePlugin
+    %s = %s:deluge.plugins.CorePlugin
     [deluge.plugin.gtkui]
-    %s = %s:GtkUIPlugin
+    %s = %s:deluge.plugins.GtkUIPlugin
     [deluge.plugin.webui]
-    %s = %s:WebUIPlugin
+    %s = %s:deluge.plugins.WebUIPlugin
     """ % ((__plugin_name__, __plugin_name__.lower())*3)
 )

-- 
You received this message because you are subscribed to the Google Groups 
"deluge-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/deluge-commit?hl=en.

Reply via email to