mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 11:35:49 +00:00
Better libtorrent check in setup
This commit is contained in:
parent
aeb6b96987
commit
18cc95933a
1 changed files with 12 additions and 1 deletions
13
setup.py
13
setup.py
|
@ -176,7 +176,18 @@ for source in _sources:
|
|||
break
|
||||
|
||||
_ext_modules = []
|
||||
if windows_check() or not os.path.exists(os.path.join(sysconfig.get_config_var("LIBDIR"), "libtorrent-rasterbar.so.1")):
|
||||
|
||||
# Check for a system libtorrent and if found, then do not build the libtorrent extension
|
||||
build_libtorrent = True
|
||||
try:
|
||||
import libtorrent
|
||||
except ImportError:
|
||||
build_libtorrent = True
|
||||
else:
|
||||
if libtorrent.version_major == 0 and libtorrent.version_minor == 14:
|
||||
build_libtorrent = False
|
||||
|
||||
if build_libtorrent:
|
||||
# There isn't a system libtorrent library, so let's build the one included with deluge
|
||||
libtorrent = Extension(
|
||||
'libtorrent',
|
||||
|
|
Loading…
Add table
Reference in a new issue