Commit aaea62b9 authored by Mike Bjorge's avatar Mike Bjorge Committed by Commit Bot

Revert "[gsutil] run through "vpython""

This reverts commit 23836a64.

Reason for revert: This is breaking all the chromecast builders.

Original change's description:
> [gsutil] run through "vpython"
> 
> Run "gsutil" through "vpython". This ensures that the package set
> accompanying it is completely controlled. This is notably important on
> GCE instances, which "gsutil" expects to supply a
> "google_compute_engine" package.
> 
> BUG=None
> TEST=local
>   - Ran `gsutil cp` on 64-bit Linux machine, seems to work.
>   - Ran `gsutil cp` on GCE instance, seems to work.
> 
> Change-Id: Id771bc4da4de22c941b0ace4031cb0f3364feeeb
> Reviewed-on: https://chromium-review.googlesource.com/527277
> Reviewed-by: Nodir Turakulov <nodir@chromium.org>
> Reviewed-by: Robbie Iannucci <iannucci@chromium.org>
> Commit-Queue: Daniel Jacques <dnj@chromium.org>

TBR=iannucci@chromium.org,dnj@chromium.org,nodir@chromium.org

Change-Id: Ifc3d6389720abd0fb9e3fc83c0cdd5a63b5ff94d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: None
Reviewed-on: https://chromium-review.googlesource.com/656358Reviewed-by: 's avatarNodir Turakulov <nodir@chromium.org>
Commit-Queue: Nodir Turakulov <nodir@chromium.org>
parent 23836a64
......@@ -29,9 +29,6 @@ DEFAULT_BIN_DIR = os.path.join(THIS_DIR, 'external_bin', 'gsutil')
DEFAULT_FALLBACK_GSUTIL = os.path.join(
THIS_DIR, 'third_party', 'gsutil', 'gsutil')
IS_WINDOWS = os.name == 'nt'
class InvalidGsutilError(Exception):
pass
......@@ -129,17 +126,8 @@ def run_gsutil(force_version, fallback, target, args, clean=False):
else:
gsutil_bin = fallback
disable_update = ['-o', 'GSUtil:software_update_check_period=0']
# Run "gsutil" through "vpython". We need to do this because on GCE instances,
# expectations are made about Python having access to "google-compute-engine"
# and "boto" packages that are not met with non-system Python (e.g., bundles).
cmd = [
'vpython',
'-vpython-spec', os.path.join(THIS_DIR, 'gsutil.vpython'),
'--',
gsutil_bin
] + disable_update + args
return subprocess.call(cmd, shell=IS_WINDOWS)
cmd = [sys.executable, gsutil_bin] + disable_update + args
return subprocess.call(cmd)
def parse_args():
......
# vpython VirtualEnv protobuf for "gsutil".
#
# See:
# https://chromium.googlesource.com/infra/luci/luci-go/+/master/vpython/api/vpython/spec.proto
#
# This is a "vpython" VirtualEnv specification applied to invocations of "gsutil"
# by the bootstrap wrapper, "gsutil.py". It ensures that any Python distribution
# has the expected Python packages installed.
#
# This is specifically relevant on Google Compute Engine invocations of
# "gsutil", where a stock system-deployed file in "/etc/" explicitly specifies
# that the "google_compute_engine" and "boto" Python packages are available.
wheel <
name: "infra/python/wheels/google_compute_engine-py2_py3"
version: "version:2.3.7"
>
wheel <
name: "infra/python/wheels/boto-py2_py3"
version: "version:2.47.0"
>
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