mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-22 08:08:17 +00:00
Deluge will now use a system libtorrent library if available.
This commit is contained in:
parent
646901d8da
commit
86d1624cff
@ -33,7 +33,10 @@
|
||||
|
||||
import os
|
||||
|
||||
import deluge.libtorrent as lt
|
||||
try:
|
||||
import libtorrent as lt
|
||||
except ImportError:
|
||||
import deluge.libtorrent as lt
|
||||
import deluge.component as component
|
||||
from deluge.configmanager import ConfigManager
|
||||
from deluge.log import LOG as log
|
||||
|
@ -46,7 +46,10 @@ import gobject
|
||||
import threading
|
||||
import socket
|
||||
|
||||
import deluge.libtorrent as lt
|
||||
try:
|
||||
import libtorrent as lt
|
||||
except ImportError:
|
||||
import deluge.libtorrent as lt
|
||||
import deluge.configmanager
|
||||
import deluge.common
|
||||
import deluge.component as component
|
||||
|
@ -37,7 +37,10 @@ import pickle
|
||||
import cPickle
|
||||
import shutil
|
||||
|
||||
import deluge.libtorrent as lt
|
||||
try:
|
||||
import libtorrent as lt
|
||||
except ImportError:
|
||||
import deluge.libtorrent as lt
|
||||
from deluge.configmanager import ConfigManager
|
||||
import deluge.core.torrentmanager
|
||||
from deluge.log import LOG as log
|
||||
|
@ -35,7 +35,10 @@ import os.path
|
||||
import threading
|
||||
import gobject
|
||||
|
||||
import deluge.libtorrent as lt
|
||||
try:
|
||||
import libtorrent as lt
|
||||
except ImportError:
|
||||
import deluge.libtorrent as lt
|
||||
import deluge.configmanager
|
||||
import deluge.common
|
||||
import deluge.component as component
|
||||
|
@ -36,7 +36,10 @@
|
||||
import os
|
||||
from urlparse import urlparse
|
||||
|
||||
import deluge.libtorrent as lt
|
||||
try:
|
||||
import libtorrent as lt
|
||||
except ImportError:
|
||||
import deluge.libtorrent as lt
|
||||
import deluge.common
|
||||
import deluge.component as component
|
||||
from deluge.configmanager import ConfigManager
|
||||
|
@ -40,7 +40,10 @@ import time
|
||||
|
||||
import gobject
|
||||
|
||||
import deluge.libtorrent as lt
|
||||
try:
|
||||
import libtorrent as lt
|
||||
except ImportError:
|
||||
import deluge.libtorrent as lt
|
||||
|
||||
import deluge.common
|
||||
import deluge.component as component
|
||||
|
23
setup.py
23
setup.py
@ -188,14 +188,19 @@ for source in _sources:
|
||||
_sources.remove(source)
|
||||
break
|
||||
|
||||
libtorrent = Extension(
|
||||
'libtorrent',
|
||||
extra_compile_args = _extra_compile_args,
|
||||
include_dirs = _include_dirs,
|
||||
libraries = _libraries,
|
||||
library_dirs = _library_dirs,
|
||||
sources = _sources
|
||||
)
|
||||
_ext_modules = []
|
||||
if not os.path.exists(os.path.join(sysconfig.get_config_var("LIBDIR"), "libtorrent-rasterbar.so.1")):
|
||||
# There isn't a system libtorrent library, so let's build the one included with deluge
|
||||
libtorrent = Extension(
|
||||
'libtorrent',
|
||||
extra_compile_args = _extra_compile_args,
|
||||
include_dirs = _include_dirs,
|
||||
libraries = _libraries,
|
||||
library_dirs = _library_dirs,
|
||||
sources = _sources
|
||||
)
|
||||
|
||||
_ext_modules = [libtorrent]
|
||||
|
||||
class build_trans(cmd.Command):
|
||||
description = 'Compile .po files into .mo files'
|
||||
@ -298,7 +303,7 @@ setup(
|
||||
deluged = deluge.main:start_daemon
|
||||
""",
|
||||
ext_package = "deluge",
|
||||
ext_modules = [libtorrent],
|
||||
ext_modules = _ext_modules,
|
||||
fullname = "Deluge Bittorent Client",
|
||||
include_package_data = True,
|
||||
license = "GPLv3",
|
||||
|
Loading…
x
Reference in New Issue
Block a user