瀏覽代碼

git_cl/gclient: use python2

Newer distros are defaulting /usr/bin/python to python3, so use python2
explicitly so we continue working.

Review URL: https://codereview.chromium.org/1437773002

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@297535 0039d316-1c4b-4281-b951-d872f2087c98
vapier@chromium.org 9 年之前
父節點
當前提交
b0fe123965
共有 4 個文件被更改,包括 4 次插入4 次删除
  1. 1 1
      gclient
  2. 1 1
      gclient.py
  3. 1 1
      git_cl.py
  4. 1 1
      tests/gclient_smoketest.py

+ 1 - 1
gclient

@@ -9,4 +9,4 @@ if [[ "#grep#fetch#cleanup#diff#" != *"#$1#"* ]]; then
   "$base_dir"/update_depot_tools "$@"
 fi
 
-PYTHONDONTWRITEBYTECODE=1 exec python "$base_dir/gclient.py" "$@"
+PYTHONDONTWRITEBYTECODE=1 exec python2.7 "$base_dir/gclient.py" "$@"

+ 1 - 1
gclient.py

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2.7
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
git_cl.py

@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2.7
 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
 # Use of this source code is governed by a BSD-style license that can be
 # found in the LICENSE file.

+ 1 - 1
tests/gclient_smoketest.py

@@ -517,7 +517,7 @@ class GClientSmokeGIT(GClientSmokeBase):
         ('running', self.root_dir),                 # pre-deps hook
         ('running', self.root_dir),                 # pre-deps hook (fails)
     ]
-    expected_stderr = ("Error: Command '/usr/bin/python -c import sys; "
+    expected_stderr = ("Error: Command '/usr/bin/python2.7 -c import sys; "
                        "sys.exit(1)' returned non-zero exit status 1 in %s\n"
                        % self.root_dir)
     stdout, stderr, retcode = self.gclient(['sync', '--deps', 'mac', '--jobs=1',