Skip to content
Snippets Groups Projects
Verified Commit cc306fc4 authored by Justin Carpentier's avatar Justin Carpentier
Browse files

travis: set default python version

parent 335bf724
No related branches found
No related tags found
No related merge requests found
...@@ -75,7 +75,7 @@ script: ...@@ -75,7 +75,7 @@ script:
- mkdir build - mkdir build
- cd build - cd build
- export CMAKE_PREFIX_PATH=/tmp/_ci/install - export CMAKE_PREFIX_PATH=/tmp/_ci/install
- cmake .. - cmake .. -DPYTHON_EXECUTABLE=$PYTHON_DEFAULT_VERSION
- make - make
- ./extra_lib - ./extra_lib
- cd /tmp/_ci/build - cd /tmp/_ci/build
......
...@@ -2,8 +2,10 @@ ...@@ -2,8 +2,10 @@
# Add Python dependency # Add Python dependency
echo "TRAVIS_PYTHON_VERSION=$TRAVIS_PYTHON_VERSION" echo "TRAVIS_PYTHON_VERSION=$TRAVIS_PYTHON_VERSION"
export PYTHON_DEFAULT_VERSION=$(which python2)
if [[ $TRAVIS_PYTHON_VERSION -gt 30 ]]; then if [[ $TRAVIS_PYTHON_VERSION -gt 30 ]]; then
export APT_DEPENDENCIES=$APT_DEPENDENCIES" python3-numpy" export APT_DEPENDENCIES=$APT_DEPENDENCIES" python3-numpy"
export PYTHON_DEFAULT_VERSION=$(which python3)
fi fi
# When this script is called the current directory is ./custom_travis # When this script is called the current directory is ./custom_travis
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment