CMake won't find the right Python 2.7, so tell it where it is.

This commit is contained in:
Donny Lawrence 2018-05-30 19:16:25 -05:00
parent 0f241837be
commit a70ccf5d13
3 changed files with 12 additions and 4 deletions

View File

@ -71,8 +71,7 @@ before_script:
script:
- >
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cmake -DHAVE_CARBON=NO -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2o_1 \
-DBUILD_METALIBS=$BUILD_METALIBS -DCOMPOSITE_SOURCE_LIMIT=$COMPOSITE_SOURCE_LIMIT ..;
../.travis/script_macos.sh;
else
cmake -DHAVE_GTK2=NO -DBUILD_METALIBS=$BUILD_METALIBS \
-DCOMPOSITE_SOURCE_LIMIT=$COMPOSITE_SOURCE_LIMIT ..;

View File

@ -5,5 +5,5 @@ wxmac opencv assimp libvorbis openssl@1.0 || true
brew install ode --with-shared
# We can't trust brew to make the right symlinks, so execute commands as modules
/usr/local/bin/${PYTHON_INTERP:-python3} -m pip install virtualenv
/usr/local/bin/${PYTHON_INTERP:-python3} -m virtualenv venv
${PYTHON_INTERP:-python3} -m pip install virtualenv
${PYTHON_INTERP:-python3} -m virtualenv venv

9
.travis/script_macos.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
if [[ "$PYTHON_INTERP" == "python2.7" ]]; then
export PY2_CMAKE_ARGS="-DPYTHON_EXECUTABLE=/usr/local/bin/python -DPYTHON_LIBRARY=/usr/local/opt/python@2/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib"
fi
cmake -DHAVE_CARBON=NO -DOPENSSL_ROOT_DIR=/usr/local/Cellar/openssl/1.0.2o_1 \
-DBUILD_METALIBS=$BUILD_METALIBS -DCOMPOSITE_SOURCE_LIMIT=$COMPOSITE_SOURCE_LIMIT \
$PY2_CMAKE_ARGS ..