From 5cb49da3cf7eb6fb3c3864f24f797724c221ff04 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 28 Nov 2014 18:58:18 +0000 Subject: [PATCH] merged changes from RC_1_0 --- bindings/python/Jamfile | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/bindings/python/Jamfile b/bindings/python/Jamfile index 984e18c71..ed56dc706 100755 --- a/bindings/python/Jamfile +++ b/bindings/python/Jamfile @@ -1,5 +1,8 @@ import python ; import feature : feature ; +import project ; +import targets ; +import "class" : new ; use-project /torrent : ../.. ; @@ -10,7 +13,7 @@ feature visibility : default hidden : composite propagated link-incompatible ; feature.compose hidden : -fvisibility=hidden -fvisibility-inlines-hidden ; feature libtorrent-link : static shared : ; -feature libtorrent-python-pic : on off : composite propagated link-incompatible ; +feature libtorrent-python-pic : off on : composite propagated link-incompatible ; feature.compose on : -fPIC ; rule libtorrent_linking ( properties * ) @@ -75,7 +78,27 @@ rule libtorrent_linking ( properties * ) return $(result) ; } -python-extension libtorrent +# this is a copy of the rule from boost-build's python-extension, but without +# specifying no as a mandatory property. That property +# would otherwise cause build failures because it suppresses linking against the +# runtime library and kernel32 on windows + +rule my-python-extension ( name : sources * : requirements * : default-build * : + usage-requirements * ) +{ + requirements += /python//python_for_extensions ; + + local project = [ project.current ] ; + + targets.main-target-alternative + [ new typed-target $(name) : $(project) : PYTHON_EXTENSION + : [ targets.main-target-sources $(sources) : $(name) ] + : [ targets.main-target-requirements $(requirements) : $(project) ] + : [ targets.main-target-default-build $(default-build) : $(project) ] + ] ; +} + +my-python-extension libtorrent : # sources src/module.cpp src/big_number.cpp @@ -103,6 +126,7 @@ python-extension libtorrent : # default build static static + false ; install stage_module : libtorrent : . ;