diff --git a/ChangeLog b/ChangeLog index 566f277da..c5ba12102 100644 --- a/ChangeLog +++ b/ChangeLog @@ -86,6 +86,7 @@ incoming connection * added more detailed instrumentation of the disk I/O thread + * fixed python bindings build with disabled DHT support * fixed BSD file allocation issue * fixed bug in session::delete_files option to remove_torrent diff --git a/bindings/python/src/session.cpp b/bindings/python/src/session.cpp index 7aa3f1149..bff1b2314 100644 --- a/bindings/python/src/session.cpp +++ b/bindings/python/src/session.cpp @@ -411,6 +411,7 @@ void bind_session() #endif ; +#ifndef TORRENT_DISABLE_DHT class_("dht_lookup") .def_readonly("type", &dht_lookup::type) .def_readonly("outstanding_requests", &dht_lookup::outstanding_requests) @@ -418,6 +419,7 @@ void bind_session() .def_readonly("response", &dht_lookup::responses) .def_readonly("branch_factor", &dht_lookup::branch_factor) ; +#endif enum_("storage_mode_t") .value("storage_mode_allocate", storage_mode_allocate) diff --git a/bindings/python/src/torrent_handle.cpp b/bindings/python/src/torrent_handle.cpp index 59abafb72..dd7ac0a89 100644 --- a/bindings/python/src/torrent_handle.cpp +++ b/bindings/python/src/torrent_handle.cpp @@ -338,7 +338,9 @@ void bind_torrent_handle() .def("need_save_resume_data", _(&torrent_handle::need_save_resume_data)) .def("force_reannounce", _(force_reannounce0)) .def("force_reannounce", &force_reannounce) +#ifndef TORRENT_DISABLE_DHT .def("force_dht_announce", _(&torrent_handle::force_dht_announce)) +#endif .def("scrape_tracker", _(&torrent_handle::scrape_tracker)) .def("name", _(&torrent_handle::name)) .def("set_upload_mode", _(&torrent_handle::set_upload_mode))