mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-05 16:08:40 +00:00
Ported the Label plugin to the deluge.plugins namespace.
This commit is contained in:
parent
4c3d068f0c
commit
b9a8bf2409
15 changed files with 15 additions and 7 deletions
3
deluge/plugins/Label/deluge/__init__.py
Normal file
3
deluge/plugins/Label/deluge/__init__.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# this is a namespace package
|
||||||
|
import pkg_resources
|
||||||
|
pkg_resources.declare_namespace(__name__)
|
3
deluge/plugins/Label/deluge/plugins/__init__.py
Normal file
3
deluge/plugins/Label/deluge/plugins/__init__.py
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
# this is a namespace package
|
||||||
|
import pkg_resources
|
||||||
|
pkg_resources.declare_namespace(__name__)
|
|
@ -46,7 +46,8 @@ from deluge.plugins.pluginbase import WebPluginBase
|
||||||
from deluge import component
|
from deluge import component
|
||||||
|
|
||||||
def get_resource(filename):
|
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):
|
class WebUI(WebPluginBase):
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
from setuptools import setup
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
__plugin_name__ = "Label"
|
__plugin_name__ = "Label"
|
||||||
__author__ = "Martijn Voncken"
|
__author__ = "Martijn Voncken"
|
||||||
|
@ -49,7 +49,7 @@ adds a tracker column.
|
||||||
future: Real labels.
|
future: Real labels.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
__pkg_data__ = {__plugin_name__.lower(): ["template/*", "data/*"]}
|
__pkg_data__ = {"deluge.plugins."+__plugin_name__.lower(): ["template/*", "data/*"]}
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name=__plugin_name__,
|
name=__plugin_name__,
|
||||||
|
@ -61,15 +61,16 @@ setup(
|
||||||
license=__license__,
|
license=__license__,
|
||||||
long_description=__long_description__,
|
long_description=__long_description__,
|
||||||
|
|
||||||
packages=[__plugin_name__.lower(), "label.gtkui"],
|
packages=find_packages(),
|
||||||
|
namespace_packages = ["deluge", "deluge.plugins"],
|
||||||
package_data = __pkg_data__,
|
package_data = __pkg_data__,
|
||||||
|
|
||||||
entry_points="""
|
entry_points="""
|
||||||
[deluge.plugin.core]
|
[deluge.plugin.core]
|
||||||
%s = %s:CorePlugin
|
%s = deluge.plugins.%s:CorePlugin
|
||||||
[deluge.plugin.gtkui]
|
[deluge.plugin.gtkui]
|
||||||
%s = %s:GtkUIPlugin
|
%s = deluge.plugins.%s:GtkUIPlugin
|
||||||
[deluge.plugin.web]
|
[deluge.plugin.web]
|
||||||
%s = %s:WebUIPlugin
|
%s = deluge.plugins.%s:WebUIPlugin
|
||||||
""" % ((__plugin_name__, __plugin_name__.lower())*3)
|
""" % ((__plugin_name__, __plugin_name__.lower())*3)
|
||||||
)
|
)
|
Loading…
Add table
Add a link
Reference in a new issue