Expect the python binary on path to be a symlink
For example, on FreeBSD, ${PREFIX}/bin/python is a symlink
to the correct python version.
MOS_MIGRATED_REVID=145068920
@@ -22,6 +22,8 @@ def SearchPath(name):
for directory in search_path:
if directory == '': continue
path = os.path.join(directory, name)
+ if os.path.islink(path):
+ path = os.path.realpath(path)
if os.path.isfile(path) and os.access(path, os.X_OK):
return path
return None
