Skip to content

Commit

Permalink
Help cmake to find the right Python version.
Browse files Browse the repository at this point in the history
When "python" is Python 3, cmake's Python interpreter search
finds a python2 binary before python, and ends up failing since
this doesn't match the library/header versions.
  • Loading branch information
benmwebb committed Sep 27, 2016
1 parent 0095e4e commit e317ffd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ script:
- mkdir build
- cd build
- ../tools/coverage/setup.py
- PYTHON_EXE=$(which python)
- PYTHON_INC=$(echo $(dirname $(which python))/../include/*/)
- PYTHON_LIB=$(echo /opt/python/${TRAVIS_PYTHON_VERSION}.*/lib/libpython${TRAVIS_PYTHON_VERSION}*.so)
- PYTHONPATH=`pwd`/coverage cmake .. -DCMAKE_BUILD_TYPE=Debug -DPYTHON_INCLUDE_DIR=$PYTHON_INC -DPYTHON_LIBRARY=$PYTHON_LIB -DCMAKE_C_FLAGS="-fprofile-arcs -ftest-coverage"
- PYTHONPATH=`pwd`/coverage cmake .. -DCMAKE_BUILD_TYPE=Debug -DPYTHON_EXECUTABLE=$PYTHON_EXE -DPYTHON_INCLUDE_DIR=$PYTHON_INC -DPYTHON_LIBRARY=$PYTHON_LIB -DCMAKE_C_FLAGS="-fprofile-arcs -ftest-coverage"
- rm ../src/mdt_config.h
- make
- ctest --output-on-failure
Expand Down

0 comments on commit e317ffd

Please sign in to comment.