--- setup.py.orig 2007-03-18 18:26:48.000000000 +0100 +++ setup.py 2007-03-18 18:32:13.000000000 +0100 @@ -52,20 +52,15 @@ # seem as if something is going wrong with the compile, and # it has been removed to prevent confusion. -removals = ['-g', '-DNDEBUG', '-O2', '-Wstrict-prototypes'] additions = ['-DNDEBUG', '-O2'] if pythonVersion == '2.5': cv_opt = sysconfig.get_config_vars()["CFLAGS"] - for removal in removals: - cv_opt = cv_opt.replace(removal, " ") for addition in additions: cv_opt = cv_opt + " " + addition sysconfig.get_config_vars()["CFLAGS"] = ' '.join(cv_opt.split()) else: cv_opt = sysconfig.get_config_vars()["OPT"] - for removal in removals: - cv_opt = cv_opt.replace(removal, " ") for addition in additions: cv_opt = cv_opt + " " + addition sysconfig.get_config_vars()["OPT"] = ' '.join(cv_opt.split()) @@ -82,47 +77,10 @@ # Ubuntu possible. deluge_core = Extension('deluge_core', - include_dirs = ['./libtorrent', './libtorrent/include', - './libtorrent/include/libtorrent', - '/usr/include/python' + pythonVersion], - libraries = ['boost_filesystem', 'boost_date_time', - 'boost_program_options', 'boost_regex', - 'boost_serialization', 'boost_thread', - 'z', 'pthread'], - extra_compile_args = ["-Wno-missing-braces"], - sources = ['src/deluge_core.cpp', - 'libtorrent/src/alert.cpp', - 'libtorrent/src/allocate_resources.cpp', - 'libtorrent/src/bt_peer_connection.cpp', - 'libtorrent/src/entry.cpp', - 'libtorrent/src/escape_string.cpp', - 'libtorrent/src/file.cpp', - 'libtorrent/src/http_tracker_connection.cpp', - 'libtorrent/src/identify_client.cpp', - 'libtorrent/src/ip_filter.cpp', - 'libtorrent/src/peer_connection.cpp', - 'libtorrent/src/piece_picker.cpp', - 'libtorrent/src/policy.cpp', - 'libtorrent/src/session.cpp', - 'libtorrent/src/session_impl.cpp', - 'libtorrent/src/sha1.cpp', - 'libtorrent/src/stat.cpp', - 'libtorrent/src/storage.cpp', - 'libtorrent/src/torrent.cpp', - 'libtorrent/src/torrent_handle.cpp', - 'libtorrent/src/torrent_info.cpp', - 'libtorrent/src/tracker_manager.cpp', - 'libtorrent/src/udp_tracker_connection.cpp', - 'libtorrent/src/web_peer_connection.cpp', - 'libtorrent/src/kademlia/closest_nodes.cpp', - 'libtorrent/src/kademlia/dht_tracker.cpp', - 'libtorrent/src/kademlia/find_data.cpp', - 'libtorrent/src/kademlia/node.cpp', - 'libtorrent/src/kademlia/node_id.cpp', - 'libtorrent/src/kademlia/refresh.cpp', - 'libtorrent/src/kademlia/routing_table.cpp', - 'libtorrent/src/kademlia/rpc_manager.cpp', - 'libtorrent/src/kademlia/traversal_algorithm.cpp']) + include_dirs = [sysconfig.get_python_inc(), '/usr/include', '/usr/include/libtorrent'], + libraries = ['boost_filesystem', 'torrent'], + extra_compile_args = ["-Wno-missing-braces"], + sources = ['src/deluge_core.cpp']) # Thanks to Iain Nicol for code to save the location for installed prefix # At runtime, we need to know where we installed the data to.