On Wednesday, January 07, 2015 05:36:00 PM Matěj Cepl wrote: > From: Matěj Cepl <[email protected]> > > Hi, > > I am in the process of struggle to build piglit from the master > (commit 4adb082) on RHEL-6 (we would like to continue to use it > for testing). > > When I tried just naively build our RHEL-7/Fedora 20+ package on > EL-6 configuration failed because it complained it is missing > python 2.6. Which is a bit strange, because of course, RHEL-6 > does contain python 2.6. So, I went digging to find out where > this message comes from and I have discovered this interesting > piece of code: > > # Check for presence of Python 2.6 or greater. > foreach(python_cmd python2 python) > execute_process( > COMMAND ${python_cmd} -c \ > "import sys; assert '2.7' <= sys.version < '3'" > OUTPUT_QUIET > ERROR_QUIET > RESULT_VARIABLE python_version_check_error_code) > if(python_version_check_error_code EQUAL 0) > set(python ${python_cmd}) > break() > endif(python_version_check_error_code EQUAL 0) > endforeach(python_cmd) > > if(NOT DEFINED python) > message(FATAL_ERROR "python version 2.x (where x >= 6) required") > endif(NOT DEFINED python) > > First obviously this code lies. Either we really care about > python 2.7 and we should declare our loyalities openly, or piglit > can be working with python 2.6 (which I hope) and then that '2.7' > is just a typo.
I have fixed the error message.
>
> Which one it is? How difficult it would be to switch piglit to
> python 2.6? I hope not that difficult (as there were not that
> many changes between 2.6 and 2.7). Does anybody know?
We rely on a couple of 2.7 features, one of them is oredered
dictionaries, the other is dict comprehensions. We also use a lot of
unnamed format strings ( '{}{}'.format(a, b) ).
>
> And of course, when I apply just the attached patch I get to yet
> another problem: freeglut (RHEL-6 has freeglut-2.6.0). But let's
> walk this minefield one mine at the time.
You need waffle, glut is not recommended for linux.
(https://github.com/waffle-gl/waffle, http://www.waffle-gl.org)
Dylan
>
> Best,
>
> Matěj
>
> ---
> CMakeLists.txt | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index 6fb6c8a..d2f2f0e 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -190,7 +190,7 @@ ENDIF()
> # Check for presence of Python 2.6 or greater.
> foreach(python_cmd python2 python)
> execute_process(
> - COMMAND ${python_cmd} -c "import sys; assert '2.7' <=
> sys.version < '3'"
> + COMMAND ${python_cmd} -c "import sys; assert '2.6' <=
> sys.version < '3'"
> OUTPUT_QUIET
> ERROR_QUIET
> RESULT_VARIABLE python_version_check_error_code)
> --
> 1.8.3.1
>
> _______________________________________________
> Piglit mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
