On Friday, May 09, 2014 16:31:09 Tom Stellard wrote:
> ---
>  piglit | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/piglit b/piglit
> index af8dfb1..f0e6696 100755
> --- a/piglit
> +++ b/piglit
> @@ -38,7 +38,7 @@ import argparse
>
>  # If running in the source directory there will be a HACKING file, don't
>  # muck with things, if not we need to screw with the python path
> -if not path.exists('HACKING'):
> +if not path.exists('HACKING') and 'PIGLIT_SOURCE_DIR' not in os.environ:
>      _binpath, _bin = path.split(__file__)
>      _libdir = path.abspath(path.join(_binpath, '..', 'lib', _bin))
>      sys.path.append(_libdir)
>

That will break running piglit out of tree if you've set
PIGLIT_SOURCE_DIR, since it won't add the python modules to the python
path. I haven't tested, but I think this is what you want:

if not path.exists('HACKING'):
        _binpath, _bin = path.split(__file__)
    _libdir = path.abspath(path.join(_binpath, '..', 'lib', _bin))
    sys.path.append(_libdir)
    if 'PIGLIT_SOURCE_DIR' not in os.environ:
        os.environ['PIGLIT_SOURCE_DIR'] = libdir_

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Piglit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to