|
Line
Link Here
|
| 0 |
-- setup.py |
0 |
++ setup.py |
|
Lines 207-244
Link Here
|
| 207 |
|
207 |
|
| 208 |
_ext_modules = [] |
208 |
_ext_modules = [] |
| 209 |
|
209 |
|
| 210 |
# Check for a system libtorrent and if found, then do not build the libtorrent extension |
210 |
import deluge._libtorrent |
| 211 |
build_libtorrent = True |
|
|
| 212 |
try: |
| 213 |
from deluge._libtorrent import lt |
| 214 |
except ImportError: |
| 215 |
build_libtorrent = True |
| 216 |
else: |
| 217 |
build_libtorrent = False |
| 218 |
|
| 219 |
if build_libtorrent: |
| 220 |
got_libtorrent = False |
| 221 |
if not os.path.exists("libtorrent"): |
| 222 |
import subprocess |
| 223 |
if subprocess.call(['./get_libtorrent.sh']) > 0: |
| 224 |
got_libtorrent = False |
| 225 |
else: |
| 226 |
got_libtorrent = True |
| 227 |
else: |
| 228 |
got_libtorrent = True |
| 229 |
|
| 230 |
if got_libtorrent: |
| 231 |
# There isn't a system libtorrent library, so let's build the one included with deluge |
| 232 |
libtorrent = Extension( |
| 233 |
'libtorrent', |
| 234 |
extra_compile_args = _extra_compile_args, |
| 235 |
include_dirs = _include_dirs, |
| 236 |
libraries = _libraries, |
| 237 |
library_dirs = _library_dirs, |
| 238 |
sources = _sources |
| 239 |
) |
| 240 |
|
| 241 |
_ext_modules = [libtorrent] |
| 242 |
|
211 |
|
| 243 |
desktop_data = 'deluge/data/share/applications/deluge.desktop' |
212 |
desktop_data = 'deluge/data/share/applications/deluge.desktop' |