build boost from scratch on linux (to get a newer version). upgrade travis to trusty and newer xcode. python binding fixes
This commit is contained in:
parent
48de05ba82
commit
b03b7417dd
24
.travis.yml
24
.travis.yml
|
@ -1,4 +1,5 @@
|
|||
language: cpp
|
||||
dist: trusty
|
||||
|
||||
matrix:
|
||||
fast_finish: true
|
||||
|
@ -16,8 +17,7 @@ matrix:
|
|||
- os: osx
|
||||
osx_image: xcode7.3
|
||||
env: variant=test_barebones tools=1 examples=1 toolset=darwin python=1
|
||||
- dist: trusty
|
||||
env: arch=arm toolset=gcc-arm
|
||||
- env: arch=arm toolset=gcc-arm
|
||||
|
||||
notifications:
|
||||
email: false
|
||||
|
@ -145,7 +145,7 @@ script:
|
|||
# libtorrent is the name of the test suite target
|
||||
- cd test
|
||||
- 'if [ "$tests" == "1" ]; then
|
||||
travis_retry bjam -j3 warnings-as-errors=on crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant libtorrent test_natpmp enum_if -l300 &&
|
||||
travis_retry bjam -j3 warnings-as-errors=on crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant libtorrent test_natpmp enum_if -l300 &&
|
||||
if [ "$coverage" == "1" ]; then
|
||||
codecov --root .. --gcov-exec gcov-5;
|
||||
fi;
|
||||
|
@ -153,36 +153,28 @@ script:
|
|||
|
||||
- cd ../examples
|
||||
- 'if [ "$examples" == "1" ]; then
|
||||
bjam -j3 warnings-as-errors=on crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant link=shared;
|
||||
bjam -j3 warnings-as-errors=on crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant link=shared;
|
||||
fi'
|
||||
- cd ..
|
||||
|
||||
- cd tools
|
||||
- 'if [ "$tools" == "1" ]; then
|
||||
bjam -j3 warnings-as-errors=on crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant link=shared;
|
||||
bjam -j3 warnings-as-errors=on crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant link=shared;
|
||||
fi'
|
||||
- cd ..
|
||||
|
||||
# build libtorrent separately and install it in a temporary (well known) dir
|
||||
# we have to do this because on linux the name of the python module is the same
|
||||
# as the main library, so we cannot stage them to the same directory
|
||||
# here we specify the temporary lib dir as a path to look for the main library
|
||||
- 'if [ "$python" == "1" ]; then
|
||||
bjam -j3 warnings-as-errors=on crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant link=shared install location=./lib;
|
||||
fi'
|
||||
|
||||
# a binary built with sanitizer does not interact well with python
|
||||
- cd bindings/python
|
||||
- 'if [[ "$python" == "1" ]]; then
|
||||
bjam -j3 warnings-as-errors=on crypto=$crypto debug-iterators=on picker-debugging=on invariant-checks=full $toolset variant=$variant stage_module libtorrent-link=shared install-type=LIB dll-path=../../lib &&
|
||||
LD_LIBRARY_PATH=../../lib DYLD_LIBRARY_PATH=../../lib python test.py;
|
||||
bjam -j3 warnings-as-errors=on crypto=$crypto debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset variant=$variant stage_module stage_dependencies libtorrent-link=shared boost-link=shared &&
|
||||
LD_LIBRARY_PATH=./dependencies DYLD_LIBRARY_PATH=./dependencies python test.py;
|
||||
fi'
|
||||
- cd ../..;
|
||||
|
||||
# simulation
|
||||
- cd simulation
|
||||
- 'if [[ "$sim" == "1" ]]; then
|
||||
bjam -j2 crypto=built-in warnings-as-errors=on debug-iterators=on picker-debugging=on invariant-checks=full $toolset deprecated-functions=off;
|
||||
bjam -j2 crypto=built-in warnings-as-errors=on debug-iterators=on picker-debugging=on asserts=on invariant-checks=full $toolset deprecated-functions=off;
|
||||
fi'
|
||||
- cd ..
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ environment:
|
|||
crypto: openssl
|
||||
|
||||
install:
|
||||
- if defined sim ( git submodule update --init --recursive )
|
||||
- git submodule update --init --recursive
|
||||
- set ROOT_DIRECTORY=%CD%
|
||||
- cd %ROOT_DIRECTORY%
|
||||
- if %compiler% == msvc-14.0 if defined crypto if not exist openssl-1.0.1p-vs2015.7z (
|
||||
|
@ -83,7 +83,7 @@ build_script:
|
|||
- cd %ROOT_DIRECTORY%\bindings\python
|
||||
# we use 64 bit python builds
|
||||
- if defined python (
|
||||
b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% debug-iterators=on picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% crypto=%crypto% libtorrent-link=shared stage_module install-dependencies=on
|
||||
b2.exe --hash openssl-version=pre1.1 warnings-as-errors=on -j2 %compiler% address-model=%model% debug-iterators=on picker-debugging=on invariant-checks=full variant=%variant% %linkflags% %include% link=shared crypto=%crypto% crypto=%crypto% libtorrent-link=shared stage_module stage_dependencies
|
||||
)
|
||||
|
||||
# simulations
|
||||
|
@ -98,7 +98,10 @@ test_script:
|
|||
|
||||
- cd %ROOT_DIRECTORY%\bindings\python
|
||||
# we use 64 bit python build
|
||||
- if defined python ( c:\Python35-x64\python.exe test.py )
|
||||
- if defined python (
|
||||
copy dependencies\*.* .
|
||||
& c:\Python35-x64\python.exe test.py
|
||||
)
|
||||
|
||||
# simulation tests
|
||||
- cd %ROOT_DIRECTORY%\simulation
|
||||
|
|
|
@ -161,8 +161,17 @@ my-python-extension libtorrent
|
|||
install stage_module
|
||||
: libtorrent
|
||||
: <location>.
|
||||
<install-type>LIB
|
||||
<install-type>PYTHON_EXTENSION
|
||||
;
|
||||
|
||||
install stage_dependencies
|
||||
: /torrent//torrent
|
||||
boost_python
|
||||
: <location>dependencies
|
||||
<install-dependencies>on
|
||||
<install-type>SHARED_LIB
|
||||
;
|
||||
|
||||
explicit stage_module ;
|
||||
explicit stage_dependencies ;
|
||||
|
||||
|
|
|
@ -6,11 +6,22 @@
|
|||
#define BOOST_PYTHON_HPP
|
||||
|
||||
#include <libtorrent/aux_/disable_warnings_push.hpp>
|
||||
#include <iostream>
|
||||
#include <boost/python.hpp>
|
||||
|
||||
#include <boost/bind/placeholders.hpp>
|
||||
|
||||
// in boost 1.60, placeholders moved into a namespace, just like std
|
||||
#if BOOST_VERSION >= 106000
|
||||
using namespace boost::placeholders;
|
||||
#endif
|
||||
|
||||
#include <boost/python/stl_iterator.hpp>
|
||||
#include <boost/get_pointer.hpp>
|
||||
|
||||
#include <libtorrent/aux_/disable_warnings_pop.hpp>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
// something in here creates a define for this, presumably to make older
|
||||
// versions of msvc appear to support snprintf
|
||||
#ifdef snprintf
|
||||
|
|
|
@ -30,6 +30,7 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
*/
|
||||
|
||||
#include "boost_python.hpp"
|
||||
#include <libtorrent/error_code.hpp>
|
||||
#include <libtorrent/bdecode.hpp>
|
||||
#include <libtorrent/upnp.hpp>
|
||||
|
@ -38,8 +39,9 @@ POSSIBILITY OF SUCH DAMAGE.
|
|||
namespace boost
|
||||
{
|
||||
// this fixe mysterious link error on msvc
|
||||
boost::system::error_category const volatile*
|
||||
get_pointer(boost::system::error_category const volatile* p)
|
||||
template <>
|
||||
inline boost::system::error_category const volatile*
|
||||
get_pointer(class boost::system::error_category const volatile* p)
|
||||
{
|
||||
return p;
|
||||
}
|
||||
|
@ -49,7 +51,6 @@ namespace boost
|
|||
#if defined TORRENT_USE_OPENSSL
|
||||
#include <boost/asio/ssl/error.hpp>
|
||||
#endif
|
||||
#include "boost_python.hpp"
|
||||
|
||||
using namespace boost::python;
|
||||
using namespace lt;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <libtorrent/fingerprint.hpp>
|
||||
#include "boost_python.hpp"
|
||||
#include <libtorrent/fingerprint.hpp>
|
||||
|
||||
void bind_fingerprint()
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <libtorrent/ip_filter.hpp>
|
||||
#include "boost_python.hpp"
|
||||
#include <libtorrent/ip_filter.hpp>
|
||||
#include "gil.hpp"
|
||||
|
||||
using namespace boost::python;
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
#define BOOST_PYTHON_USE_GCC_SYMBOL_VISIBILITY 1
|
||||
#endif
|
||||
|
||||
#include "libtorrent/config.hpp"
|
||||
#include <boost/python/module.hpp>
|
||||
#include "libtorrent/config.hpp"
|
||||
|
||||
void bind_utility();
|
||||
void bind_fingerprint();
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
// subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "boost_python.hpp"
|
||||
#include <libtorrent/peer_info.hpp>
|
||||
#include <libtorrent/bitfield.hpp>
|
||||
#include "boost_python.hpp"
|
||||
#include <boost/python/iterator.hpp>
|
||||
|
||||
using namespace boost::python;
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
// subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "boost_python.hpp"
|
||||
#include <list>
|
||||
#include <string>
|
||||
#include <libtorrent/session.hpp>
|
||||
|
@ -27,8 +28,9 @@
|
|||
namespace boost
|
||||
{
|
||||
// this fixes mysterious link error on msvc
|
||||
lt::alert const volatile*
|
||||
get_pointer(lt::alert const volatile* p)
|
||||
template <>
|
||||
inline lt::alert const volatile*
|
||||
get_pointer(class lt::alert const volatile* p)
|
||||
{
|
||||
return p;
|
||||
}
|
||||
|
@ -36,7 +38,6 @@ namespace boost
|
|||
|
||||
#include "gil.hpp"
|
||||
#include "bytes.hpp"
|
||||
#include "boost_python.hpp"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#pragma warning(push)
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
// subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "boost_python.hpp"
|
||||
#include <libtorrent/sha1_hash.hpp>
|
||||
#include <iostream>
|
||||
|
||||
#include "boost_python.hpp"
|
||||
#include "bytes.hpp"
|
||||
|
||||
long get_hash(boost::python::object o)
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
// subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include "boost_python.hpp"
|
||||
#include <libtorrent/identify_client.hpp>
|
||||
#include <libtorrent/bencode.hpp>
|
||||
#include "boost_python.hpp"
|
||||
#include "bytes.hpp"
|
||||
|
||||
using namespace boost::python;
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
// subject to the Boost Software License, Version 1.0. (See accompanying
|
||||
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <libtorrent/version.hpp>
|
||||
#include "boost_python.hpp"
|
||||
#include <libtorrent/version.hpp>
|
||||
|
||||
using namespace boost::python;
|
||||
using lt::version;
|
||||
|
|
|
@ -59,12 +59,13 @@ namespace libtorrent {
|
|||
struct counters;
|
||||
struct settings_pack;
|
||||
struct storage_params;
|
||||
struct storage_error;
|
||||
class file_storage;
|
||||
|
||||
struct storage_holder;
|
||||
|
||||
struct file_open_mode_tag;
|
||||
using file_open_mode_t = flags::bitfield_flag<std::uint32_t, file_open_mode_tag>;
|
||||
using file_open_mode_t = flags::bitfield_flag<std::uint8_t, file_open_mode_tag>;
|
||||
|
||||
namespace file_open_mode
|
||||
{
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
#include "libtorrent/config.hpp"
|
||||
#include "libtorrent/assert.hpp"
|
||||
#include "libtorrent/config.hpp"
|
||||
#include <cstdio>
|
||||
|
||||
#if TORRENT_USE_INVARIANT_CHECKS
|
||||
|
||||
|
|
Loading…
Reference in New Issue