diff options
author | Damien Churchill <damoxc@gmail.com> | 2010-07-22 21:13:26 +0100 |
---|---|---|
committer | Damien Churchill <damoxc@gmail.com> | 2010-07-22 21:13:27 +0100 |
commit | 161ad0ff0d01463f07127b9f01e0087f61f22a11 (patch) | |
tree | 4cd627aeb72c3436b82f96cfe9e3d5dc004a85d3 | |
parent | 7f323ec0fc587566748c087f02cf1d6c871a3ad4 (diff) | |
download | deluge-161ad0ff0d01463f07127b9f01e0087f61f22a11.tar.gz deluge-161ad0ff0d01463f07127b9f01e0087f61f22a11.tar.bz2 deluge-161ad0ff0d01463f07127b9f01e0087f61f22a11.zip |
use the get_libtorrent.sh script to get libtorrent if it is missing
-rw-r--r-- | setup.py | 35 |
1 files changed, 23 insertions, 12 deletions
@@ -213,18 +213,29 @@ except ImportError: else: build_libtorrent = False -if build_libtorrent and os.path.exists("libtorrent") and os.listdir("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] +if build_libtorrent: + got_libtorrent = False + if not os.path.exists("libtorrent"): + import subprocess + if subprocess.call(['./get_libtorrent.sh']) > 0: + got_libtorrent = False + else: + got_libtorrent = True + else: + got_libtorrent = True + + 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): description = 'Compile .po files into .mo files' |