diff --git a/gsutil.py b/gsutil.py index eb339bc41..d57cafb94 100755 --- a/gsutil.py +++ b/gsutil.py @@ -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(): diff --git a/gsutil.vpython b/gsutil.vpython deleted file mode 100644 index ad7207dcd..000000000 --- a/gsutil.vpython +++ /dev/null @@ -1,21 +0,0 @@ -# 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" ->