From 684c3098d90036600edf66424f3dcd35222d2baa Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 3 Feb 2008 01:12:46 +0000 Subject: [PATCH] Touch-up setup.py. --- setup.py | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/setup.py b/setup.py index bb5bed111..a278bda6b 100644 --- a/setup.py +++ b/setup.py @@ -76,7 +76,6 @@ except: # The libtorrent extension _extra_compile_args = [ - "-Wno-missing-braces", "-DHAVE_INCLUDE_LIBTORRENT_ASIO____ASIO_HPP=1", "-DHAVE_INCLUDE_LIBTORRENT_ASIO_SSL_STREAM_HPP=1", "-DHAVE_INCLUDE_LIBTORRENT_ASIO_IP_TCP_HPP=1", @@ -86,9 +85,9 @@ _extra_compile_args = [ "-O2", "-DNDEBUG" ] + if windows_check(): - _extra_compile_args.remove("-Wno-missing-braces") - _extra_compile_args = _extra_compile_args + [ + _extra_compile_args += [ "-DBOOST_WINDOWS", "-DWIN32_LEAN_AND_MEAN", "-D_WIN32_WINNT=0x0500", @@ -102,7 +101,9 @@ if windows_check(): "-DTORRENT_BUILDING_SHARED", "-DTORRENT_LINKING_SHARED", ] - +else: + _extra_compile_args += ["-Wno-missing-braces"] + removals = ["-Wstrict-prototypes"] if not windows_check(): @@ -119,11 +120,11 @@ if not windows_check(): _extra_link_args = [ ] + _include_dirs = [ './libtorrent', './libtorrent/include', './libtorrent/include/libtorrent', - '/usr/include/python' + python_version ] _libraries = [ @@ -133,19 +134,12 @@ _libraries = [ 'boost_python', 'z', 'pthread', - 'ssl', ] if windows_check(): - _extra_link_args = _extra_link_args + [ - '-L./win32/lib' - ] - _include_dirs.remove('/usr/include/python' + python_version) - _include_dirs = _include_dirs + [ - './win32/include' - ] - _libraries.remove('ssl') - _libraries = _libraries + [ + _extra_link_args += ['-L./win32/lib'] + _include_dirs += ['./win32/include'] + _libraries += [ 'ssleay32MT', 'libeay32MT', 'advapi32', @@ -153,7 +147,10 @@ if windows_check(): 'gdi32', 'ws2_32' ] - +else: + _include_dirs += ['/usr/include/python' + python_version] + _libraries += ['ssl'] + _sources = glob.glob("./libtorrent/src/*.cpp") + \ glob.glob("./libtorrent/src/kademlia/*.cpp") + \ glob.glob("./libtorrent/bindings/python/src/*.cpp")