From 64172461d430ed87233c3a145ad53add6a084a01 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Tue, 7 Jun 2016 09:45:38 +0200 Subject: [PATCH 1/4] Travis: build tuttle binding with numpy --- tools/travis/build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/travis/build.sh b/tools/travis/build.sh index a96180e2a..7a29e6f03 100755 --- a/tools/travis/build.sh +++ b/tools/travis/build.sh @@ -19,7 +19,7 @@ fi # Build tuttle cmake --version -cmake ${TUTTLEOFX_DEV} -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=${TUTTLEOFX_INSTALL} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DTUTTLE_EXPERIMENTAL=True -DWITHOUT_NUMPY=True -DTUTTLE_DEPLOY_DEPENDENCIES=True -DTUTTLE_PYTHON_VERSION=${PYTHON_VERSION} +cmake ${TUTTLEOFX_DEV} -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=${TUTTLEOFX_INSTALL} -DCMAKE_PREFIX_PATH=$CMAKE_PREFIX_PATH -DTUTTLE_EXPERIMENTAL=True -DTUTTLE_DEPLOY_DEPENDENCIES=True -DTUTTLE_PYTHON_VERSION=${PYTHON_VERSION} make -k make install/strip cd .. From 2ac86bff469acd389ed49ee6acc01beaf5bbdc45 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Tue, 7 Jun 2016 09:46:19 +0200 Subject: [PATCH 2/4] pyTest: activate python tests with numpy --- libraries/tuttle/pyTest/numpy/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 libraries/tuttle/pyTest/numpy/__init__.py diff --git a/libraries/tuttle/pyTest/numpy/__init__.py b/libraries/tuttle/pyTest/numpy/__init__.py new file mode 100644 index 000000000..e69de29bb From 675d6bceb084f60190bc2b18ea57d0eee2dcfc03 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Tue, 7 Jun 2016 11:02:36 +0200 Subject: [PATCH 3/4] CMake: added a warn message if cannot find numpy headers --- libraries/tuttle/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/tuttle/CMakeLists.txt b/libraries/tuttle/CMakeLists.txt index 829d9f461..f9652cbf5 100644 --- a/libraries/tuttle/CMakeLists.txt +++ b/libraries/tuttle/CMakeLists.txt @@ -145,6 +145,7 @@ if (TuttleBoost_FOUND) if(NUMPY_FOUND) include_directories(${NUMPY_INCLUDE_DIR}) else() + message(WARNING "Cannot find numpy headers: TuttleOFX python binding will not use numpy.") set(SWIG_NUMPY_FLAG "-DWITHOUT_NUMPY") endif() endif() From 6cfbac7f8ec3ffd48b360a9d199291a09a443db1 Mon Sep 17 00:00:00 2001 From: Clement Champetier Date: Tue, 7 Jun 2016 14:28:10 +0200 Subject: [PATCH 4/4] Travis: fixed import of numpy --- .travis.yml | 1 - tools/travis/install_dependencies.sh | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 542c7fa5c..3ed513e83 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,7 +81,6 @@ addons: - libboost1.55-all-dev - python-dev - python-imaging - - python-numpy - python-nose - python3-dev - python3-setuptools diff --git a/tools/travis/install_dependencies.sh b/tools/travis/install_dependencies.sh index 134176adf..d9b36e7ed 100755 --- a/tools/travis/install_dependencies.sh +++ b/tools/travis/install_dependencies.sh @@ -10,9 +10,11 @@ if [[ ${TRAVIS_OS_NAME} == "linux" ]]; then # Install python packages to run sam command line if [[ ${PYTHON_VERSION} == "2.7" ]]; then pip install --user clint argcomplete - # elif [[ ${PYTHON_VERSION} == "3.2" ]]; then + pip install --user numpy + elif [[ ${PYTHON_VERSION} == "3.2" ]]; then # easy_install3 pip --prefix=$HOME/local # pip3 install --user clint argcomplete + pip3 install --user numpy fi # Use TRAVIS_JOB_ID to detect that we are in travis.