Re: [Piglit] [PATCH] Do we really need python 2.7?
On 2015-01-29, 19:02 GMT, Dylan Baker wrote: > registry.py uses functools.total_ordering, which is 2.7+. You might be > able to get it building without a complete set of rich comparison > methods, if that fails you could roll a mixin class to provide the same > functionality. Not in adb082 I am packaging (it came only in 2ee1e510), fortunately, but yes, I think I could add total_ordering package from PyPI when I need it. Thanks for informing me. Best, Matěj ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Do we really need python 2.7?
registry.py uses functools.total_ordering, which is 2.7+. You might be able to get it building without a complete set of rich comparison methods, if that fails you could roll a mixin class to provide the same functionality. On Thursday, January 29, 2015 19:30:48 Matěj Cepl wrote: > I was taking look also at the code itself and so far i have > changed all imports of collections to the proper shape (I hope > proper) and changed all {} formats to {0} (or {1} etc.). So far > I have http://mcepl.fedorapeople.org/tmp/piglit-python-2_6.patch > Does anybody see anything else which could be missing (now > building an RHEL-6 virtual machine to make some more tests)? > > Best, > > Matěj > > ___ > Piglit mailing list > Piglit@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/piglit > signature.asc Description: This is a digitally signed message part. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Do we really need python 2.7?
On 2015-01-26, 17:32 GMT, Dylan Baker wrote: > We use mako in two places. As Matt pointed out for generating tests, in > this capacity it's a build-time dependency. It's also used to generate > the pages for the HTML summary. > > I think you can sidestep the issue using pip, > pip install --user mako > will install a new copy of mako in your ~/.local directory, which should > be sufficient. I cannot download anything into Koji because I don't have network available there (and of course bundling from the third party sources is strictly verbotten in Fedora/RHEL). However, we have now python-mako1.0 in EPEL-6 (https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-0534/python-mako1.0-1.0.1-2.el6) and I am working on python-backport_collections (https://pypi.python.org/pypi/backport_collections and https://bugzilla.redhat.com/show_bug.cgi?id=1187224). So, I think there is some hope. I was taking look also at the code itself and so far i have changed all imports of collections to the proper shape (I hope proper) and changed all {} formats to {0} (or {1} etc.). So far I have http://mcepl.fedorapeople.org/tmp/piglit-python-2_6.patch Does anybody see anything else which could be missing (now building an RHEL-6 virtual machine to make some more tests)? Best, Matěj ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Do we really need python 2.7?
On Mon, Jan 26, 2015 at 10:18 AM, Matěj Cepl wrote: > On 2015-01-26, 17:32 GMT, Dylan Baker wrote: >> We use mako in two places. As Matt pointed out for generating tests, in >> this capacity it's a build-time dependency. It's also used to generate >> the pages for the HTML summary. >> >> I think you can sidestep the issue using pip, >> pip install --user mako >> will install a new copy of mako in your ~/.local directory, which should >> be sufficient. > > I really cannot download anything to the Fedora builders, so > this won't do. However, I think I can work around this. Either > I will add more recent mako to EPEL 6 or I will pre-generate the > tests. > > I can build piglit for RHEL-6 > (http://copr.fedoraproject.org/coprs/mcepl/piglit-el6/), but > I am cheating with the most recent python-mako from Rawhide > (python-mako-1.0.0-1) which doesn't exist for RHEL-6 (yet) and > of course I am quite certain there are tons of broken code > inside of the package (also we will most likely need more > external packages backporting various python 2.7 functionality). > > I will investigate how does it work and I will report the > results. > > Thanks so far, > > Matěj > > ___ > Piglit mailing list > Piglit@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/piglit Can EPEL 7 Mako 0.7.3 be backported to EPEL 6? Mako 0.7.3 would satisfy the piglit Mako requirement. https://bugzilla.redhat.com/show_bug.cgi?id=784257 http://pkgs.fedoraproject.org/cgit/python-mako.git/commit/?h=epel7&id=b84857680f56070d9b01367975071a7c394bde0d ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Do we really need python 2.7?
On 2015-01-26, 17:32 GMT, Dylan Baker wrote: > We use mako in two places. As Matt pointed out for generating tests, in > this capacity it's a build-time dependency. It's also used to generate > the pages for the HTML summary. > > I think you can sidestep the issue using pip, > pip install --user mako > will install a new copy of mako in your ~/.local directory, which should > be sufficient. I really cannot download anything to the Fedora builders, so this won't do. However, I think I can work around this. Either I will add more recent mako to EPEL 6 or I will pre-generate the tests. I can build piglit for RHEL-6 (http://copr.fedoraproject.org/coprs/mcepl/piglit-el6/), but I am cheating with the most recent python-mako from Rawhide (python-mako-1.0.0-1) which doesn't exist for RHEL-6 (yet) and of course I am quite certain there are tons of broken code inside of the package (also we will most likely need more external packages backporting various python 2.7 functionality). I will investigate how does it work and I will report the results. Thanks so far, Matěj ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Do we really need python 2.7?
On Friday, January 23, 2015 23:49:29 Matěj Cepl wrote: > On 2015-01-07, 19:25 GMT, Dylan Baker wrote: > > 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) ). > > That can be patched around (and collections used > https://pypi.python.org/pypi/backport_collections/). So, I am > still not giving up. > > >> 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) > > See https://kojipkgs.fedoraproject.org//work/tasks/658/8710658/build.log > > What's the deal with Mako? > > -- Looking for Mako >= 0.7.3 > CMake Error at cmake/Modules/PiglitFindMako.cmake:73 (message): > Found Mako 0.3.4, but Mako >= 0.7.3 is required > Hint: Try installing Mako with `pip install --user --upgrade Mako` > > Call Stack (most recent call first): > CMakeLists.txt:207 (include) > > What kind of functionality is backed by Mako? Could it be switched off? (or > we can build new Mako 1.0.0 in EPEL-6 > http://koji.fedoraproject.org/koji/taskinfo?taskID=8711312). > > Best, > > Matěj We use mako in two places. As Matt pointed out for generating tests, in this capacity it's a build-time dependency. It's also used to generate the pages for the HTML summary. I think you can sidestep the issue using pip, pip install --user mako will install a new copy of mako in your ~/.local directory, which should be sufficient. > > ___ > Piglit mailing list > Piglit@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/piglit > signature.asc Description: This is a digitally signed message part. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Do we really need python 2.7?
We already have that target, gen-tests On Jan 23, 2015 6:50 PM, "Emil Velikov" wrote: > On 24 January 2015 at 01:53, Matt Turner wrote: > > On Fri, Jan 23, 2015 at 2:49 PM, Matěj Cepl wrote: > >> What kind of functionality is backed by Mako? Could it be switched off? > (or we can build new Mako 1.0.0 in EPEL-6 > http://koji.fedoraproject.org/koji/taskinfo?taskID=8711312). > > > > A bunch of tests are generated at build-time using mako templates. > > > Wild guess: perhaps we can add a separate target that generates the > tests. This way one can run it prior to making the tarball. > The former feels like a hack imho, and I'm not 100% sure that cpack > will pick the generated files. Yet it's something to try if one really > wants to avoid the mako dependency :-) > > -Emil > ___ > Piglit mailing list > Piglit@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/piglit > ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Do we really need python 2.7?
On 24 January 2015 at 01:53, Matt Turner wrote: > On Fri, Jan 23, 2015 at 2:49 PM, Matěj Cepl wrote: >> What kind of functionality is backed by Mako? Could it be switched off? (or >> we can build new Mako 1.0.0 in EPEL-6 >> http://koji.fedoraproject.org/koji/taskinfo?taskID=8711312). > > A bunch of tests are generated at build-time using mako templates. > Wild guess: perhaps we can add a separate target that generates the tests. This way one can run it prior to making the tarball. The former feels like a hack imho, and I'm not 100% sure that cpack will pick the generated files. Yet it's something to try if one really wants to avoid the mako dependency :-) -Emil ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Do we really need python 2.7?
On Fri, Jan 23, 2015 at 2:49 PM, Matěj Cepl wrote: > What kind of functionality is backed by Mako? Could it be switched off? (or > we can build new Mako 1.0.0 in EPEL-6 > http://koji.fedoraproject.org/koji/taskinfo?taskID=8711312). A bunch of tests are generated at build-time using mako templates. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Do we really need python 2.7?
On 2015-01-07, 19:25 GMT, Dylan Baker wrote: > 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) ). That can be patched around (and collections used https://pypi.python.org/pypi/backport_collections/). So, I am still not giving up. >> 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) See https://kojipkgs.fedoraproject.org//work/tasks/658/8710658/build.log What's the deal with Mako? -- Looking for Mako >= 0.7.3 CMake Error at cmake/Modules/PiglitFindMako.cmake:73 (message): Found Mako 0.3.4, but Mako >= 0.7.3 is required Hint: Try installing Mako with `pip install --user --upgrade Mako` Call Stack (most recent call first): CMakeLists.txt:207 (include) What kind of functionality is backed by Mako? Could it be switched off? (or we can build new Mako 1.0.0 in EPEL-6 http://koji.fedoraproject.org/koji/taskinfo?taskID=8711312). Best, Matěj ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
Re: [Piglit] [PATCH] Do we really need python 2.7?
On Wednesday, January 07, 2015 05:36:00 PM Matěj Cepl wrote: > From: Matěj Cepl > > 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 > Piglit@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/piglit > signature.asc Description: This is a digitally signed message part. ___ Piglit mailing list Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit
[Piglit] [PATCH] Do we really need python 2.7?
From: Matěj Cepl 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. 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? 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. 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 Piglit@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/piglit