Skip to content

Commit cc306fc

Browse files
committed
travis: set default python version
1 parent 335bf72 commit cc306fc

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ script:
7575
- mkdir build
7676
- cd build
7777
- export CMAKE_PREFIX_PATH=/tmp/_ci/install
78-
- cmake ..
78+
- cmake .. -DPYTHON_EXECUTABLE=$PYTHON_DEFAULT_VERSION
7979
- make
8080
- ./extra_lib
8181
- cd /tmp/_ci/build

travis_custom/custom_before_install

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
# Add Python dependency
44
echo "TRAVIS_PYTHON_VERSION=$TRAVIS_PYTHON_VERSION"
5+
export PYTHON_DEFAULT_VERSION=$(which python2)
56
if [[ $TRAVIS_PYTHON_VERSION -gt 30 ]]; then
67
export APT_DEPENDENCIES=$APT_DEPENDENCIES" python3-numpy"
8+
export PYTHON_DEFAULT_VERSION=$(which python3)
79
fi
810

911
# When this script is called the current directory is ./custom_travis

0 commit comments

Comments
 (0)