Skip to content

Commit 2a17606

Browse files
author
Clement Champetier
committed
hotfix Travis: fix launch of pyTest
* Install coverage tools even if Travis builds with clang ( because it's easier to manage the command line to launch test, which uses coverage nosetests plugin). * Add CMake parameter to choose python version of the binding: AVTRANSCODER_PYTHON_VERSION_OF_BINDING (Travis has updated its default python version to 3.2.3).
1 parent a786476 commit 2a17606

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ before_script:
2424

2525
- cd ${TRAVIS_BUILD_DIR}
2626

27-
# install coverage tools used by gcc compiler
28-
- if [ "${CC}" = "gcc" ]; then ./tools/travis.gcc.install.coverage.sh; fi
27+
# install coverage tools
28+
- ./tools/travis.gcc.install.coverage.sh
2929

3030
# install avtranscoder dependencies
3131
- if [ "${TRAVIS_OS_NAME}" = "linux" ]; then ./tools/travis.linux.install.deps.sh; fi
@@ -35,7 +35,7 @@ script:
3535
# Build
3636
- mkdir -p ${AVTRANSCODER_BUILD}
3737
- cd ${AVTRANSCODER_BUILD}
38-
- cmake .. -DCMAKE_INSTALL_PREFIX=${AVTRANSCODER_INSTALL} -DCMAKE_BUILD_TYPE=Release -DAVTRANSCODER_COVERAGE=True
38+
- cmake .. -DCMAKE_INSTALL_PREFIX=${AVTRANSCODER_INSTALL} -DCMAKE_BUILD_TYPE=Release -DAVTRANSCODER_PYTHON_VERSION_OF_BINDING=2.7 -DAVTRANSCODER_COVERAGE=True
3939
- make $J install
4040

4141
# Launch tests

INSTALL.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@ cmake .. -DCMAKE_INSTALL_PREFIX=/path/to/install
4545
```
4646
cmake .. -DCMAKE_BUILD_TYPE=Release/Debug
4747
```
48+
###### To build python binding with a specific python version
49+
```
50+
cmake .. -DAVTRANSCODER_PYTHON_VERSION_OF_BINDING=2.7
51+
```
4852

4953
#### Mac OSX using homebrew
5054

src/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ if(SWIG_FOUND)
8080
if(AVTRANSCODER_DISABLE_PYTHON_BINDING)
8181
message("PYTHON binding disabled, will not build python binding.")
8282
else()
83-
find_package(PythonLibs)
83+
find_package(PythonLibs ${AVTRANSCODER_PYTHON_VERSION_OF_BINDING})
8484
if(PYTHONLIBS_FOUND)
8585
include_directories(${PYTHON_INCLUDE_PATH})
8686

0 commit comments

Comments
 (0)