[cmake] Read python name from PYTHON_BIN in cram module

This commit is contained in:
Snaipe 2016-01-20 12:25:34 +01:00
parent cf63230bf6
commit 7f7029cb03
2 changed files with 4 additions and 4 deletions

View file

@ -46,12 +46,10 @@ if (WIN32)
endif ()
endif ()
execute_process (COMMAND python3 --version TIMEOUT 1 RESULT_VARIABLE PYTHON3_RES)
if (NOT PYTHON3_RES STREQUAL "0")
if (NOT ENV{PYTHON_BIN})
set (PYTHON "python")
else ()
set (PYTHON "python3")
set (PYTHON "$ENV{PYTHON_BIN}")
endif ()
execute_process (COMMAND ${PYTHON} -m cram -v ${CRAM_OPTS} "${CRAM_PATH}" TIMEOUT 60 RESULT_VARIABLE RES)

View file

@ -103,8 +103,10 @@ before_install:
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
brew install python3
export PATH="$(python3 -m site --user-base)/bin:$PATH"
export PYTHON_BIN="python3"
else
curl -L https://bootstrap.pypa.io/get-pip.py | python3.5 - --user
export PYTHON_BIN="python3.5"
fi
pip3 install --user cram==0.6