Browse Source

package/ci: use pybind11 2.3.0.

pull/2/head
Vladimír Vondruš 7 years ago
parent
commit
e4aa19884a
  1. 13
      package/ci/pybind11-system-includes.patch
  2. 13
      package/ci/setup-pybind11.sh
  3. 10
      package/ci/travis.yml

13
package/ci/pybind11-system-includes.patch

@ -1,13 +0,0 @@
diff --git a/tools/pybind11Tools.cmake b/tools/pybind11Tools.cmake
index 52a70c2..1e9d033 100644
--- a/tools/pybind11Tools.cmake
+++ b/tools/pybind11Tools.cmake
@@ -130,7 +130,7 @@ function(pybind11_add_module target_name)
add_library(${target_name} ${lib_type} ${exclude_from_all} ${ARG_UNPARSED_ARGUMENTS})
- target_include_directories(${target_name}
+ target_include_directories(${target_name} SYSTEM
PRIVATE ${PYBIND11_INCLUDE_DIR} # from project CMakeLists.txt
PRIVATE ${pybind11_INCLUDE_DIR} # from pybind11Config
PRIVATE ${PYTHON_INCLUDE_DIRS})

13
package/ci/setup-pybind11.sh

@ -1,17 +1,8 @@
set -e
wget --no-clobber https://github.com/pybind/pybind11/archive/v2.2.4.tar.gz && tar -xzf v2.2.4.tar.gz
wget --no-clobber https://github.com/pybind/pybind11/archive/v2.3.0.tar.gz && tar -xzf v2.3.0.tar.gz
cd pybind11-2.2.4
# Patch the CMake macro to add include paths as SYSTEM because otherwise GCC
# 4.8 gets very loud. This is already done in
# https://github.com/pybind/pybind11/pull/1416 but it's opt-in and not part of
# any release yet. For Git releases this is handled inside
# src/python/CMakeLists.txt (detecting version and applying SYSTEM), but I want
# to ensure compatibility with 2.2.4 *and* have useful CI output, so I am
# patching it here as well.
patch -p1 < $TRAVIS_BUILD_DIR/package/ci/pybind11-system-includes.patch
cd pybind11-2.3.0
mkdir -p build && cd build
cmake .. \

10
package/ci/travis.yml

@ -100,9 +100,15 @@ install:
# Code coverage of python bindings
- if [ "$TRAVIS_OS_NAME" == "linux" ] || [ "$TRAVIS_OS_NAME" == "osx" ]; then pip3 install coverage codecov; fi
# pybind11 (cached)
# pybind11 (cached). On macOS the version 2.3.0 needs a brew update, the stale
# Travis image has just 2.2.4.
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ ! -e "$HOME/pybind11/bin" ]; then $TRAVIS_BUILD_DIR/package/ci/setup-pybind11.sh; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then HOMEBREW_NO_AUTO_UPDATE=1 brew install pybind11; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install pybind11; fi
# numpy on macOS -- probably because we updated Homebrew to install new pybind
# (and thus python as well, apparently), the preinstalled numpy is no longer
# visible.
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew upgrade numpy; fi
# SwiftShader on Linux (cached). Taken from Chromium snapshot 587878
# (swiftshader-bin Arch package).

Loading…
Cancel
Save