Find a suitable version of python. (#1338)

* Find a suitable version of python.

When running presubmit, we were using /usr/bin/python3, which works fine on
systems that have a reasonably recent python version there.  However, our CI
system has a very old version of python there and prefers the use of "pyenv"
to modify the PATH to provide the desired version of python as simply
"python".  So add a check to use the first of "python" or "/usr/bin/python3"
that is at least version 3.7.3.
This commit is contained in:
Michael Muller 2021-09-27 16:43:45 -04:00 committed by GitHub
parent 4387af98e9
commit ba3552e81a
2 changed files with 25 additions and 1 deletions

View file

@ -344,6 +344,7 @@ def get_files():
if __name__ == "__main__":
print('python version is %s' % sys.version)
failed = False
for file in get_files():
error_messages = []