gclient: Execute python hooks using vpython.
Change-Id: I032c838c07ca8b715976bd9dc428c1bd6a77d80b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/1793009
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Edward Lesmes <ehmaldonado@chromium.org>
diff --git a/gclient.py b/gclient.py
index ab2ccd5..6bfe151 100755
--- a/gclient.py
+++ b/gclient.py
@@ -242,12 +242,7 @@
cmd = [arg for arg in self._action]
if cmd[0] == 'python':
- # If the hook specified "python" as the first item, the action is a
- # Python script. Run it by starting a new copy of the same interpreter if
- # we're running on Python 2.
- # When using vpython3, "python" refers to the Python 3 executable used by
- # vpython3, so use "vpython" instead.
- cmd[0] = sys.executable if six.PY2 else 'vpython'
+ cmd[0] = 'vpython'
if cmd[0] == 'vpython' and _detect_host_os() == 'win':
cmd[0] += '.bat'