Commit e210b542 authored by Aravind Vasudevan's avatar Aravind Vasudevan Committed by LUCI CQ

Use py3 in gsutil receipe module

Manual Recipe Change: https://crrev.com/c/3460620

Recipe-Manual-Change: build
Recipe-Nontrivial-Roll: build_limited
Recipe-Nontrivial-Roll: chrome_release
Recipe-Nontrivial-Roll: chromiumos
Recipe-Nontrivial-Roll: infra
Bug: 1289280
Change-Id: Ibdadf1eee3d2d5f385f520340a4f4bd8844f7bbd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3440919Reviewed-by: 's avatarJosip Sokcevic <sokcevic@google.com>
Reviewed-by: 's avatarGavin Mak <gavinmak@google.com>
Commit-Queue: Aravind Vasudevan <aravindvasudev@google.com>
parent 4bda2abf
......@@ -629,7 +629,7 @@ Returns a list of refs in the remote repository.
Generates a Gitiles repo URL. See also parse_repo_url.
### *recipe_modules* / [gsutil](/recipes/recipe_modules/gsutil)
[DEPS](/recipes/recipe_modules/gsutil/__init__.py#3): [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/python][recipe_engine/recipe_modules/python]
[DEPS](/recipes/recipe_modules/gsutil/__init__.py#3): [recipe\_engine/path][recipe_engine/recipe_modules/path], [recipe\_engine/step][recipe_engine/recipe_modules/step]
PYTHON_VERSION_COMPATIBILITY: PY2+3
......
......@@ -2,5 +2,5 @@ PYTHON_VERSION_COMPATIBILITY = 'PY2+3'
DEPS = [
'recipe_engine/path',
'recipe_engine/python',
'recipe_engine/step',
]
......@@ -71,8 +71,8 @@ class GSUtilApi(recipe_api.RecipeApi):
else:
cmd_prefix.append('--')
return self.m.python(full_name, gsutil_path, cmd_prefix + cmd,
infra_step=infra_step, **kwargs)
exec_cmd = ['python3', '-u', gsutil_path] + cmd_prefix + cmd
return self.m.step(full_name, exec_cmd, infra_step=infra_step, **kwargs)
def upload(self, source, bucket, dest, args=None, link_name='gsutil.upload',
metadata=None, unauthenticated_url=False, **kwargs):
......
[
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......@@ -27,7 +27,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_REPO[depot_tools]/gsutil.py",
"-o",
......@@ -54,7 +54,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......@@ -73,7 +73,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......@@ -92,7 +92,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......@@ -107,7 +107,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......@@ -124,7 +124,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......@@ -139,7 +139,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......@@ -154,7 +154,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......@@ -169,7 +169,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......@@ -183,7 +183,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......@@ -197,7 +197,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......@@ -215,7 +215,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......@@ -229,7 +229,7 @@
},
{
"cmd": [
"python",
"python3",
"-u",
"RECIPE_MODULE[depot_tools::gsutil]/resources/gsutil_smart_retry.py",
"--",
......
#!/usr/bin/env python
#!/usr/bin/env python3
#
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
......@@ -34,7 +34,7 @@ def main(argv):
args = parser.parse_args()
# The -- argument for the wrapped gsutil.py is escaped as ---- as python
# 2.7.3 removes all occurrences of --, not only the first.
# removes all occurrences of --, not only the first.
if '----' in args.command:
args.command[args.command.index('----')] = '--'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment