mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-27 10:30:41 +00:00
Windows build system fixes
This commit is contained in:
parent
718c789c8e
commit
ff6906997b
31
setup.py
31
setup.py
@ -179,22 +179,23 @@ else:
|
|||||||
'z'
|
'z'
|
||||||
]
|
]
|
||||||
|
|
||||||
dynamic_lib_extension = ".so"
|
if not windows_check():
|
||||||
if osx_check():
|
dynamic_lib_extension = ".so"
|
||||||
dynamic_lib_extension = ".dylib"
|
if osx_check():
|
||||||
|
dynamic_lib_extension = ".dylib"
|
||||||
|
|
||||||
_lib_extensions = ['-mt-1_36', '-mt-1_35', '-mt']
|
_lib_extensions = ['-mt-1_36', '-mt-1_35', '-mt']
|
||||||
|
|
||||||
# Modify the libs if necessary for systems with only -mt boost libs
|
# Modify the libs if necessary for systems with only -mt boost libs
|
||||||
for lib in _libraries:
|
for lib in _libraries:
|
||||||
if lib[:6] == "boost_":
|
if lib[:6] == "boost_":
|
||||||
for lib_prefix in _library_dirs:
|
for lib_prefix in _library_dirs:
|
||||||
for lib_suffix in _lib_extensions:
|
for lib_suffix in _lib_extensions:
|
||||||
# If there is a -mt version use that
|
# If there is a -mt version use that
|
||||||
if os.path.exists(os.path.join(lib_prefix, "lib" + lib + lib_suffix + dynamic_lib_extension)):
|
if os.path.exists(os.path.join(lib_prefix, "lib" + lib + lib_suffix + dynamic_lib_extension)):
|
||||||
_libraries[_libraries.index(lib)] = lib + lib_suffix
|
_libraries[_libraries.index(lib)] = lib + lib_suffix
|
||||||
lib = lib + lib_suffix
|
lib = lib + lib_suffix
|
||||||
break
|
break
|
||||||
|
|
||||||
_sources = glob.glob("./libtorrent/src/*.cpp") + \
|
_sources = glob.glob("./libtorrent/src/*.cpp") + \
|
||||||
glob.glob("./libtorrent/src/*.c") + \
|
glob.glob("./libtorrent/src/*.c") + \
|
||||||
@ -211,7 +212,7 @@ for source in _sources:
|
|||||||
break
|
break
|
||||||
|
|
||||||
_ext_modules = []
|
_ext_modules = []
|
||||||
if not os.path.exists(os.path.join(sysconfig.get_config_var("LIBDIR"), "libtorrent-rasterbar.so.1")):
|
if windows_check() or 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
|
# There isn't a system libtorrent library, so let's build the one included with deluge
|
||||||
libtorrent = Extension(
|
libtorrent = Extension(
|
||||||
'libtorrent',
|
'libtorrent',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user