From b043fba5eb6f2490ae23e7355b413a742cdec212 Mon Sep 17 00:00:00 2001 From: arvidn Date: Thu, 6 Dec 2018 01:10:27 +0100 Subject: [PATCH] unify indentation in libtorrent-python Jamfile --- bindings/python/Jamfile | 222 ++++++++++++++++++++-------------------- 1 file changed, 111 insertions(+), 111 deletions(-) diff --git a/bindings/python/Jamfile b/bindings/python/Jamfile index ac4132c1a..698efaf8d 100644 --- a/bindings/python/Jamfile +++ b/bindings/python/Jamfile @@ -31,16 +31,16 @@ if $(LIBTORRENT_PYTHON_INTERPRETER) # copied from boost 1.63's boost python jamfile rule find-py3-version { - local versions = [ feature.values python ] ; - local py3ver ; - for local v in $(versions) - { - if $(v) >= 3.0 - { - py3ver = $(v) ; - } - } - return $(py3ver) ; + local versions = [ feature.values python ] ; + local py3ver ; + for local v in $(versions) + { + if $(v) >= 3.0 + { + py3ver = $(v) ; + } + } + return $(py3ver) ; } if $(BOOST_ROOT) @@ -87,37 +87,37 @@ else rule libtorrent_linking ( properties * ) { - local result ; + local result ; - if ! windows in $(properties) - && gcc in $(properties) - && static in $(properties) - { - result += on ; - } + if ! windows in $(properties) + && gcc in $(properties) + && static in $(properties) + { + result += on ; + } - if gcc in $(properties) - || darwin in $(properties) - || clang in $(properties) - || clang-darwin in $(properties) - { - result += hidden ; + if gcc in $(properties) + || darwin in $(properties) + || clang in $(properties) + || clang-darwin in $(properties) + { + result += hidden ; - if ( gcc in $(properties) ) - { - result += -Wl,-Bsymbolic ; - } - } + if ( gcc in $(properties) ) + { + result += -Wl,-Bsymbolic ; + } + } - if static in $(properties) - { - ECHO "WARNING: you probably want to specify libtorrent-link=static rather than link=static" ; - } + if static in $(properties) + { + ECHO "WARNING: you probably want to specify libtorrent-link=static rather than link=static" ; + } - if static in $(properties) && 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" ; - } + if static in $(properties) && 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" ; + } local boost_python_lib ; @@ -136,28 +136,28 @@ rule libtorrent_linking ( properties * ) boost_python_lib = boost_python ; } - # linux must link dynamically against boost python because it pulls - # in libpthread, which must be linked dynamically since we're building a .so - # (the static build of libpthread is not position independent) - if shared in $(properties) || linux in $(properties) - { - result += $(boost_python_lib)/shared/off ; - } - else - { - result += $(boost_python_lib)/static/off ; - } + # linux must link dynamically against boost python because it pulls + # in libpthread, which must be linked dynamically since we're building a .so + # (the static build of libpthread is not position independent) + if shared in $(properties) || linux in $(properties) + { + result += $(boost_python_lib)/shared/off ; + } + else + { + result += $(boost_python_lib)/static/off ; + } - if shared in $(properties) - { - result += /torrent//torrent/shared ; - } - else - { - result += /torrent//torrent/static ; - } + if shared in $(properties) + { + result += /torrent//torrent/shared ; + } + else + { + result += /torrent//torrent/static ; + } - return $(result) ; + return $(result) ; } # this is a copy of the rule from boost-build's python-extension, but without @@ -166,73 +166,73 @@ rule libtorrent_linking ( properties * ) # runtime library and kernel32 on windows rule my-python-extension ( name : sources * : requirements * : default-build * : - usage-requirements * ) + usage-requirements * ) { - requirements += /python//python_for_extensions ; + requirements += /python//python_for_extensions ; - local project = [ project.current ] ; + 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) ] - ] ; + 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/sha1_hash.cpp - src/converters.cpp - src/create_torrent.cpp - src/fingerprint.cpp - src/utility.cpp - src/session.cpp - src/entry.cpp - src/torrent_info.cpp - src/string.cpp - src/torrent_handle.cpp - src/torrent_status.cpp - src/session_settings.cpp - src/version.cpp - src/alert.cpp - src/datetime.cpp - src/peer_info.cpp - src/ip_filter.cpp - src/magnet_uri.cpp - src/error_code.cpp - : # requirements - src - gcc:-Wno-deprecated-declarations - darwin:-Wno-deprecated-declarations - darwin:-Wno-unused-command-line-argument - @libtorrent_linking - openssl:/torrent//ssl - openssl:/torrent//crypto + : # sources + src/module.cpp + src/sha1_hash.cpp + src/converters.cpp + src/create_torrent.cpp + src/fingerprint.cpp + src/utility.cpp + src/session.cpp + src/entry.cpp + src/torrent_info.cpp + src/string.cpp + src/torrent_handle.cpp + src/torrent_status.cpp + src/session_settings.cpp + src/version.cpp + src/alert.cpp + src/datetime.cpp + src/peer_info.cpp + src/ip_filter.cpp + src/magnet_uri.cpp + src/error_code.cpp + : # requirements + src + gcc:-Wno-deprecated-declarations + darwin:-Wno-deprecated-declarations + darwin:-Wno-unused-command-line-argument + @libtorrent_linking + openssl:/torrent//ssl + openssl:/torrent//crypto # C4268: 'identifier' : 'const' static/global data initialized - # with compiler generated default constructor fills the object with zeros + # with compiler generated default constructor fills the object with zeros msvc:/wd4268 - : # default-build - all - : # usage-requirements - false - ; + : # default-build + all + : # usage-requirements + false + ; install stage_module - : libtorrent - : . - PYTHON_EXTENSION - ; + : libtorrent + : . + PYTHON_EXTENSION + ; install stage_dependencies - : /torrent//torrent - boost_python - boost_python3 - : dependencies - on - SHARED_LIB - ; + : /torrent//torrent + boost_python + boost_python3 + : dependencies + on + SHARED_LIB + ; explicit stage_module ; explicit stage_dependencies ;