fix python binding build issue

This commit is contained in:
arvidn 2015-06-06 17:38:46 -04:00
parent 9957c00def
commit a3d397e194
3 changed files with 11 additions and 12 deletions

View File

@ -12,7 +12,7 @@ lib boost_python : : <name>boost_python ;
feature visibility : default hidden : composite propagated link-incompatible ; feature visibility : default hidden : composite propagated link-incompatible ;
feature.compose <visibility>hidden : <cflags>-fvisibility=hidden <cxxflags>-fvisibility-inlines-hidden ; feature.compose <visibility>hidden : <cflags>-fvisibility=hidden <cxxflags>-fvisibility-inlines-hidden ;
feature libtorrent-link : static shared : ; feature libtorrent-link : shared static : ;
feature libtorrent-python-pic : off on : composite propagated link-incompatible ; feature libtorrent-python-pic : off on : composite propagated link-incompatible ;
feature.compose <libtorrent-python-pic>on : <cflags>-fPIC ; feature.compose <libtorrent-python-pic>on : <cflags>-fPIC ;
@ -46,7 +46,6 @@ rule libtorrent_linking ( properties * )
if <boost>source in $(properties) if <boost>source in $(properties)
{ {
if <boost-link>static in $(properties) && <target-os>linux in $(properties) if <boost-link>static in $(properties) && <target-os>linux in $(properties)
{ {
ECHO "WARNING: you cannot link statically against boost-python on linux, because it links against pthread statically in that case, which is not allowed" ; ECHO "WARNING: you cannot link statically against boost-python on linux, because it links against pthread statically in that case, which is not allowed" ;
@ -137,7 +136,7 @@ my-python-extension libtorrent
<conditional>@libtorrent_linking <conditional>@libtorrent_linking
: # default build : # default build
<boost-link>static <boost-link>static
<libtorrent-link>static <libtorrent-link>shared
<suppress-import-lib>false <suppress-import-lib>false
; ;

View File

@ -107,7 +107,7 @@ namespace
char const* filestorage_name(file_storage const& fs) char const* filestorage_name(file_storage const& fs)
{ return fs.name().c_str(); } { return fs.name().c_str(); }
bool call_python_object2(boost::python::object const& obj, std::string& i) bool call_python_object2(boost::python::object& obj, std::string const& i)
{ {
return obj(i); return obj(i);
} }
@ -123,11 +123,11 @@ namespace
void bind_create_torrent() void bind_create_torrent()
{ {
void (file_storage::*add_file0)(std::string const&, boost::int64_t void (file_storage::*add_file0)(std::string const&, boost::int64_t
, int, std::time_t, std::string const&) = &file_storage::add_file; , int, std::time_t, std::string const&) = &file_storage::add_file;
#if !defined TORRENT_NO_DEPRECATE #if !defined TORRENT_NO_DEPRECATE
#if TORRENT_USE_WSTRING #if TORRENT_USE_WSTRING
void (file_storage::*add_file1)(std::wstring const&, boost::int64_t void (file_storage::*add_file1)(std::wstring const&, boost::int64_t
, int, std::time_t, std::string const&) = &file_storage::add_file; , int, std::time_t, std::string const&) = &file_storage::add_file;
#endif // TORRENT_USE_WSTRING #endif // TORRENT_USE_WSTRING
#endif // TORRENT_NO_DEPRECATE #endif // TORRENT_NO_DEPRECATE
@ -143,12 +143,12 @@ void bind_create_torrent()
#endif #endif
void (*add_files0)(file_storage&, std::string const&, boost::uint32_t) = add_files; void (*add_files0)(file_storage&, std::string const&, boost::uint32_t) = add_files;
std::string const& (file_storage::*file_storage_symlink)(int) const = &file_storage::symlink; std::string const& (file_storage::*file_storage_symlink)(int) const = &file_storage::symlink;
sha1_hash (file_storage::*file_storage_hash)(int) const = &file_storage::hash; sha1_hash (file_storage::*file_storage_hash)(int) const = &file_storage::hash;
std::string (file_storage::*file_storage_file_path)(int, std::string const&) const = &file_storage::file_path; std::string (file_storage::*file_storage_file_path)(int, std::string const&) const = &file_storage::file_path;
boost::int64_t (file_storage::*file_storage_file_size)(int) const = &file_storage::file_size; boost::int64_t (file_storage::*file_storage_file_size)(int) const = &file_storage::file_size;
boost::int64_t (file_storage::*file_storage_file_offset)(int) const = &file_storage::file_offset; boost::int64_t (file_storage::*file_storage_file_offset)(int) const = &file_storage::file_offset;
int (file_storage::*file_storage_file_flags)(int) const = &file_storage::file_flags; int (file_storage::*file_storage_file_flags)(int) const = &file_storage::file_flags;
#if !defined TORRENT_NO_DEPRECATE #if !defined TORRENT_NO_DEPRECATE
file_entry (file_storage::*at)(int) const = &file_storage::at; file_entry (file_storage::*at)(int) const = &file_storage::at;

View File

@ -173,7 +173,7 @@ namespace libtorrent
// sent the request until it considers the tracker to have timed-out. // sent the request until it considers the tracker to have timed-out.
// Default value is 60 seconds. // Default value is 60 seconds.
int tracker_completion_timeout; int tracker_completion_timeout;
// the number of seconds to wait to receive any data from the tracker. If // the number of seconds to wait to receive any data from the tracker. If
// no data is received for this number of seconds, the tracker will be // no data is received for this number of seconds, the tracker will be
// considered as having timed out. If a tracker is down, this is the kind // considered as having timed out. If a tracker is down, this is the kind