Ported the Label plugin to the deluge.plugins namespace.

This commit is contained in:
Pedro Algarvio 2010-12-10 04:09:25 +00:00
parent 4c3d068f0c
commit b9a8bf2409
15 changed files with 15 additions and 7 deletions

View File

@ -0,0 +1,3 @@
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)

View File

@ -0,0 +1,3 @@
# this is a namespace package
import pkg_resources
pkg_resources.declare_namespace(__name__)

View File

@ -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):

View File

@ -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)
)