We actually define a minimum required mako version in cmake. Since tox is supposed to be useful for testing, we should test that version.
Mako 1.0.2 contains bug fixes for python 3.5. For versions earlier than 3.5 0.8.0 is still sufficient, but for 3.5 1.0.2 is needed. CMake is updated to enforce this. v2: - fix python 3.5 Signed-off-by: Dylan Baker <[email protected]> --- CMakeLists.txt | 12 ++++++++++-- tox.ini | 3 ++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d136edc..3b8a122 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,9 +204,17 @@ ENDIF() set(Python_ADDITIONAL_VERSIONS 3.5 3.4 3.3 2.7) find_package(PythonInterp REQUIRED) -find_package(PythonNumpy 1.6.2 REQUIRED) -find_package(PythonMako 0.8.0 REQUIRED) find_package(PythonSix 1.5.2 REQUIRED) +find_package(PythonNumpy 1.6.2 REQUIRED) + +# CMake doesn't have a VERSION_GREATER_EQUAL function, at least as of 3.0, +# And mako 1.0.2 contains bug fixes required for python 3.5 to work, so +# the only solution (short of having a series of "OR" statements, is this) +if (PYTHON_VERSION_STRING VERSION_GREATER 3.4.999999) + find_package(PythonMako 1.0.2 REQUIRED) +else () + find_package(PythonMako 0.8.0 REQUIRED) +endif (PYTHON_VERSION_STRING VERSION_GREATER 3.4.999999) # Default to compiling with debug information (`gcc -g`): if(NOT CMAKE_BUILD_TYPE) diff --git a/tox.ini b/tox.ini index bc65672..f609deb 100644 --- a/tox.ini +++ b/tox.ini @@ -6,7 +6,6 @@ skipsdist=True [testenv] passenv=HOME deps = - mako nose coverage six==1.5.2 @@ -16,6 +15,8 @@ deps = py27-{accel,noaccel}: mock==1.0.1 py27-accel: backports.lzma py27-accel: subprocess32 + py{27,33,34}: mako==0.8.0 + py35: mako==1.0.2 generator: numpy commands = {accel,noaccel}: nosetests unittests [] -- 2.7.1 _______________________________________________ Piglit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/piglit
