From: Matěj Cepl <[email protected]> The modification should to the beginning of sys.path not to the end, because otherwise it hits every package which has tests submodule (which seems to be like all of them ;)).
The first change is just to make abs_libdir more pretty. Signed-off-by: Matěj Cepl <[email protected]> --- piglit | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piglit b/piglit index 7c84ded..53a4bb4 100755 --- a/piglit +++ b/piglit @@ -91,10 +91,10 @@ def setup_module_search_path(): abs_bindir = abs_script_dir script_basename_noext = os.path.splitext(os.path.basename(__file__))[0] for libdir in ('lib64', 'lib32', 'lib'): - abs_libdir = path.join(abs_bindir, '..', libdir) + abs_libdir = path.normpath(path.join(abs_bindir, '..', libdir)) abs_data_dir = path.join(abs_libdir, script_basename_noext) if is_piglit_data_dir(abs_data_dir): - sys.path.append(abs_data_dir) + sys.path.insert(0, abs_data_dir) return print('error: failed to find piglit data directory. exiting...', file=sys.stderr) -- 1.8.3.1 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
