[cmake] Read python name from PYTHON_BIN in cram module
This commit is contained in:
parent
cf63230bf6
commit
7f7029cb03
2 changed files with 4 additions and 4 deletions
|
@ -46,12 +46,10 @@ if (WIN32)
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
execute_process (COMMAND python3 --version TIMEOUT 1 RESULT_VARIABLE PYTHON3_RES)
|
if (NOT ENV{PYTHON_BIN})
|
||||||
|
|
||||||
if (NOT PYTHON3_RES STREQUAL "0")
|
|
||||||
set (PYTHON "python")
|
set (PYTHON "python")
|
||||||
else ()
|
else ()
|
||||||
set (PYTHON "python3")
|
set (PYTHON "$ENV{PYTHON_BIN}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
execute_process (COMMAND ${PYTHON} -m cram -v ${CRAM_OPTS} "${CRAM_PATH}" TIMEOUT 60 RESULT_VARIABLE RES)
|
execute_process (COMMAND ${PYTHON} -m cram -v ${CRAM_OPTS} "${CRAM_PATH}" TIMEOUT 60 RESULT_VARIABLE RES)
|
||||||
|
|
|
@ -103,8 +103,10 @@ before_install:
|
||||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||||
brew install python3
|
brew install python3
|
||||||
export PATH="$(python3 -m site --user-base)/bin:$PATH"
|
export PATH="$(python3 -m site --user-base)/bin:$PATH"
|
||||||
|
export PYTHON_BIN="python3"
|
||||||
else
|
else
|
||||||
curl -L https://bootstrap.pypa.io/get-pip.py | python3.5 - --user
|
curl -L https://bootstrap.pypa.io/get-pip.py | python3.5 - --user
|
||||||
|
export PYTHON_BIN="python3.5"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pip3 install --user cram==0.6
|
pip3 install --user cram==0.6
|
||||||
|
|
Loading…
Add table
Reference in a new issue