Added configuration files for Travis CI integration

This commit is contained in:
Wenzel Jakob 2015-10-11 16:29:35 +02:00
parent d2a902bd45
commit 3b806d41eb
4 changed files with 36 additions and 3 deletions

29
.travis.yml Normal file
View File

@ -0,0 +1,29 @@
language: cpp
sudo: false
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- deadsnakes
packages:
- g++-4.8
- python3.5
- python3.5-dev
- python3.5-venv
matrix:
include:
- os: linux
compiler: gcc-4.8
script:
- pyvenv-3.5 venv
- cmake -DPYBIND_PYTHON_VERSION=3.5 -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5m -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.5m.so -DPYTHON_EXECUTABLE:FILEPATH=`pwd`/venv/bin/python3.5 -DCMAKE_CXX_COMPILER=g++-4.8
- make -j 2
- source venv/bin/activate
- pip install numpy
- CTEST_OUTPUT_ON_FAILURE=TRUE make test
- os: osx
compiler: clang
script:
- cmake -DPYBIND_PYTHON_VERSION=2.7
- make -j 2
- CTEST_OUTPUT_ON_FAILURE=TRUE make test

View File

@ -16,9 +16,11 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
"MinSizeRel" "RelWithDebInfo")
endif()
set(PYBIND_PYTHON_VERSION "" CACHE STRING "Python version to use for compiling the example application")
set(Python_ADDITIONAL_VERSIONS 3.4 3.5 3.6)
find_package(PythonLibs REQUIRED)
find_package(PythonInterp REQUIRED)
find_package(PythonLibs ${PYBIND_PYTHON_VERSION} REQUIRED)
find_package(PythonInterp ${PYBIND_PYTHON_VERSION} REQUIRED)
string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
if (UNIX)

View File

@ -2,6 +2,8 @@
# pybind11 — Seamless operability between C++11 and Python
[![Build Status](https://travis-ci.org/wjakob/pybind11.svg?branch=master)](https://travis-ci.org/wjakob/pybind11)
**pybind11** is a lightweight header library that exposes C++ types in Python
and vice versa, mainly to create Python bindings of existing C++ code. Its
goals and syntax are similar to the excellent

View File

@ -17,7 +17,7 @@ def sanitize(lines):
line = ""
line = remove_unicode_marker.sub(r'\1', line)
line = remove_long_marker.sub(r'\1', line)
line = remove_hex.sub(r'0xHEX', line)
line = remove_hex.sub(r'0', line)
line = shorten_floats.sub(r'\1', line)
line = line.replace('__builtin__', 'builtins')
line = line.replace('example.', '')