use the get_libtorrent.sh script to get libtorrent if it is missing

This commit is contained in:
Damien Churchill 2010-07-22 21:13:26 +01:00
commit 161ad0ff0d

View file

@ -213,18 +213,29 @@ except ImportError:
else: else:
build_libtorrent = False build_libtorrent = False
if build_libtorrent and os.path.exists("libtorrent") and os.listdir("libtorrent"): if build_libtorrent:
# There isn't a system libtorrent library, so let's build the one included with deluge got_libtorrent = False
libtorrent = Extension( if not os.path.exists("libtorrent"):
'libtorrent', import subprocess
extra_compile_args = _extra_compile_args, if subprocess.call(['./get_libtorrent.sh']) > 0:
include_dirs = _include_dirs, got_libtorrent = False
libraries = _libraries, else:
library_dirs = _library_dirs, got_libtorrent = True
sources = _sources else:
) got_libtorrent = True
_ext_modules = [libtorrent] if got_libtorrent:
# 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): class build_trans(cmd.Command):
description = 'Compile .po files into .mo files' description = 'Compile .po files into .mo files'