[Piglit] Build broken since cccc419e2 (python generated tests)
Paul Berry
stereotype441 at gmail.com
Sat Aug 6 17:29:20 PDT 2011
On 5 August 2011 19:13, Kenneth Graunke <kenneth at whitecape.org> wrote:
> Hi Paul,
>
> cmake dies for me when trying to generate your built-in tests.
>
> On Archlinux, /usr/bin/python and /usr/bin/python3 are Python 3.2, while
> Python 2 is /usr/bin/python2. cmake tries to run your scripts using
> plain 'python', which dies quickly.
>
> Mesa ends up checking for the existance of 'python2' first and prefers
> that to 'python'. This works pretty well. Not sure how to do that in
> CMake.
Ok, I have a patch which I believe fixes the problem on ArchLinux.
I'll send it to the list shortly. Would you mind letting me know if
it works? I have done some testing under ArchLinux, but my ArchLinux
install is in a VM, and is only half working at this point (I started
it this morning), so I can't test it as thoroughly as I would like.
>
> Also, at least some of your new scripts intermix spaces and tabs, which
> is frowned upon in 2.x and outright prohibited in 3.x.
Yeah, good point. There's a few other Python 3 incompatibilities in
the script too (e.g. print statements). It's less critical to address
these problems quickly (since we won't be able to upgrade to Python 3
until there's a Python-3-compatible version of Numpy available for
MacOS, and I don't know when that's going to happen). But we might as
well start getting ready for Python 3 now. I'll be happy to work on
this.
Do you think there would be any objection if I standardize on using
4-space indentation (as recommended in
http://www.python.org/dev/peps/pep-0008/)? I realize that most of
Piglit's Python code uses tabs for indentation, but 4-space
indentation has been recommended best practice in Python since 2001,
and since we're probably going to be reviewing most of Piglit's Python
code in preparation for the move to Python 3 anyhow, this seems like a
good time to start following the standard.
Paul
More information about the Piglit
mailing list