cros: raise python version requirement to 3.6
We moved chromite to require python 3.6 all the time, so update
the wrappers to match.
Bug: 997354
Test: `cros_sdk` still works
Change-Id: I78f5dc101f98a074fdc92a1f270395e2d04a2ea1
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2324825
Reviewed-by: Michael Mortensen <mmortensen@google.com>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
diff --git a/cros b/cros
index a77ccbb..4d75992 100755
--- a/cros
+++ b/cros
@@ -19,8 +19,7 @@
# Min version of Python that we *want*. We warn for older versions.
MIN_PYTHON_VER_SOFT = (3, 6)
# Min version of Python that we *require*. We abort for older versions.
-# TODO(vapier): Hard require Python 3.6 by end of 2020.
-MIN_PYTHON_VER_HARD = (3, 4)
+MIN_PYTHON_VER_HARD = (3, 6)
def _FindChromite(path):
@@ -59,9 +58,10 @@
return
progname = os.path.basename(sys.argv[0])
- print('%s: Chrome OS requires Python-%s+, but found "%s"' %
+ print('%s: Chrome OS requires Python-%s+, but "%s" is "%s"' %
(progname, '.'.join(str(x) for x in MIN_PYTHON_VER_SOFT),
- sys.version.replace('\n', ' ')), file=sys.stderr)
+ sys.executable, sys.version.replace('\n', ' ')),
+ file=sys.stderr)
if sys.version_info < MIN_PYTHON_VER_HARD:
print('%s: fatal: giving up since Python is too old.' % (progname,),
file=sys.stderr)