mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-03 07:03:39 +00:00
Revert "[Plugins] Replace pkg_resources for abspath and decode path"
This reverts commit 85364dc8ab8d42feb2d5ce38bfe1410e2309453f.
This commit is contained in:
parent
2b90f309a6
commit
3893d3e214
@ -14,12 +14,10 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
from os.path import join
|
||||
|
||||
from deluge.common import decode_bytes
|
||||
|
||||
BASE_PATH = decode_bytes(os.path.abspath(os.path.dirname(__file__)))
|
||||
from deluge.common import resource_filename
|
||||
|
||||
|
||||
def get_resource(filename):
|
||||
return os.path.join(BASE_PATH, 'data', filename)
|
||||
return resource_filename('deluge.plugins.autoadd', join('data', filename))
|
||||
|
@ -14,17 +14,15 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
from functools import wraps
|
||||
from os.path import join
|
||||
from sys import exc_info
|
||||
|
||||
from deluge.common import decode_bytes
|
||||
|
||||
BASE_PATH = decode_bytes(os.path.abspath(os.path.dirname(__file__)))
|
||||
from deluge.common import resource_filename
|
||||
|
||||
|
||||
def get_resource(filename):
|
||||
return os.path.join(BASE_PATH, 'data', filename)
|
||||
return resource_filename('deluge.plugins.blocklist', join('data', filename))
|
||||
|
||||
|
||||
def raises_errors_as(error):
|
||||
|
@ -14,12 +14,10 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
from os.path import join
|
||||
|
||||
from deluge.common import decode_bytes
|
||||
|
||||
BASE_PATH = decode_bytes(os.path.abspath(os.path.dirname(__file__)))
|
||||
from deluge.common import resource_filename
|
||||
|
||||
|
||||
def get_resource(filename):
|
||||
return os.path.join(BASE_PATH, 'data', filename)
|
||||
return resource_filename('deluge.plugins.execute', join('data', filename))
|
||||
|
@ -14,12 +14,10 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
from os.path import join
|
||||
|
||||
from deluge.common import decode_bytes
|
||||
|
||||
BASE_PATH = decode_bytes(os.path.abspath(os.path.dirname(__file__)))
|
||||
from deluge.common import resource_filename
|
||||
|
||||
|
||||
def get_resource(filename):
|
||||
return os.path.join(BASE_PATH, 'data', filename)
|
||||
return resource_filename('deluge.plugins.extractor', join('data', filename))
|
||||
|
@ -14,12 +14,10 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
from os.path import join
|
||||
|
||||
from deluge.common import decode_bytes
|
||||
|
||||
BASE_PATH = decode_bytes(os.path.abspath(os.path.dirname(__file__)))
|
||||
from deluge.common import resource_filename
|
||||
|
||||
|
||||
def get_resource(filename):
|
||||
return os.path.join(BASE_PATH, 'data', filename)
|
||||
return resource_filename('deluge.plugins.label', join('data', filename))
|
||||
|
@ -15,21 +15,19 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import logging
|
||||
import os.path
|
||||
from os.path import join
|
||||
|
||||
from twisted.internet import defer
|
||||
|
||||
from deluge import component
|
||||
from deluge.common import decode_bytes
|
||||
from deluge.common import resource_filename
|
||||
from deluge.event import known_events
|
||||
|
||||
log = logging.getLogger(__name__)
|
||||
|
||||
BASE_PATH = decode_bytes(os.path.abspath(os.path.dirname(__file__)))
|
||||
|
||||
|
||||
def get_resource(filename):
|
||||
return os.path.join(BASE_PATH, 'data', filename)
|
||||
return resource_filename('deluge.plugins.notifications', join('data', filename))
|
||||
|
||||
|
||||
class CustomNotifications(object):
|
||||
|
@ -14,12 +14,10 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
from os.path import join
|
||||
|
||||
from deluge.common import decode_bytes
|
||||
|
||||
BASE_PATH = decode_bytes(os.path.abspath(os.path.dirname(__file__)))
|
||||
from deluge.common import resource_filename
|
||||
|
||||
|
||||
def get_resource(filename):
|
||||
return os.path.join(BASE_PATH, 'data', filename)
|
||||
return resource_filename('deluge.plugins.scheduler', join('data', filename))
|
||||
|
@ -14,12 +14,10 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
from os.path import join
|
||||
|
||||
from deluge.common import decode_bytes
|
||||
|
||||
BASE_PATH = decode_bytes(os.path.abspath(os.path.dirname(__file__)))
|
||||
from deluge.common import resource_filename
|
||||
|
||||
|
||||
def get_resource(filename):
|
||||
return os.path.join(BASE_PATH, 'data', filename)
|
||||
return resource_filename('deluge.plugins.stats', join('data', filename))
|
||||
|
@ -14,12 +14,10 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
from os.path import join
|
||||
|
||||
from deluge.common import decode_bytes
|
||||
|
||||
BASE_PATH = decode_bytes(os.path.abspath(os.path.dirname(__file__)))
|
||||
from deluge.common import resource_filename
|
||||
|
||||
|
||||
def get_resource(filename):
|
||||
return os.path.join(BASE_PATH, 'data', filename)
|
||||
return resource_filename('deluge.plugins.toggle', join('data', filename))
|
||||
|
@ -14,12 +14,10 @@
|
||||
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
from os.path import join
|
||||
|
||||
from deluge.common import decode_bytes
|
||||
|
||||
BASE_PATH = decode_bytes(os.path.abspath(os.path.dirname(__file__)))
|
||||
from deluge.common import resource_filename
|
||||
|
||||
|
||||
def get_resource(filename):
|
||||
return os.path.join(BASE_PATH, 'data', filename)
|
||||
return resource_filename('deluge.plugins.webui', join('data', filename))
|
||||
|
@ -213,16 +213,12 @@ setup(
|
||||
COMMON = """
|
||||
from __future__ import unicode_literals
|
||||
|
||||
import os.path
|
||||
|
||||
from deluge.common import decode_bytes
|
||||
|
||||
BASE_PATH = decode_bytes(os.path.abspath(os.path.dirname(__file__)))
|
||||
from os.path import join
|
||||
|
||||
from deluge.common import resource_filename
|
||||
|
||||
def get_resource(filename):
|
||||
return os.path.join(BASE_PATH, 'data', filename)
|
||||
|
||||
return resource_filename('deluge.plugins.%(safe_name)s', join('data', filename))
|
||||
"""
|
||||
|
||||
GTKUI = """
|
||||
|
Loading…
x
Reference in New Issue
Block a user