diff --git a/recipes/README.recipes.md b/recipes/README.recipes.md index 46920f057..1ff188b21 100644 --- a/recipes/README.recipes.md +++ b/recipes/README.recipes.md @@ -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 diff --git a/recipes/recipe_modules/gsutil/__init__.py b/recipes/recipe_modules/gsutil/__init__.py index fe5840f4d..182fb2440 100644 --- a/recipes/recipe_modules/gsutil/__init__.py +++ b/recipes/recipe_modules/gsutil/__init__.py @@ -2,5 +2,5 @@ PYTHON_VERSION_COMPATIBILITY = 'PY2+3' DEPS = [ 'recipe_engine/path', - 'recipe_engine/python', + 'recipe_engine/step', ] diff --git a/recipes/recipe_modules/gsutil/api.py b/recipes/recipe_modules/gsutil/api.py index 152be0382..b486e7c69 100644 --- a/recipes/recipe_modules/gsutil/api.py +++ b/recipes/recipe_modules/gsutil/api.py @@ -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): diff --git a/recipes/recipe_modules/gsutil/examples/full.expected/basic.json b/recipes/recipe_modules/gsutil/examples/full.expected/basic.json index 4dd1e107c..af0ed5f0a 100644 --- a/recipes/recipe_modules/gsutil/examples/full.expected/basic.json +++ b/recipes/recipe_modules/gsutil/examples/full.expected/basic.json @@ -1,7 +1,7 @@ [ { "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", "--", diff --git a/recipes/recipe_modules/gsutil/resources/gsutil_smart_retry.py b/recipes/recipe_modules/gsutil/resources/gsutil_smart_retry.py index 807d35ae2..23fef2140 100755 --- a/recipes/recipe_modules/gsutil/resources/gsutil_smart_retry.py +++ b/recipes/recipe_modules/gsutil/resources/gsutil_smart_retry.py @@ -1,4 +1,4 @@ -#!/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('----')] = '--'