From b65bfd53b7ce251cf5f641e7803b165479c14154 Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Wed, 2 Mar 2022 23:21:17 +0000 Subject: [PATCH] Revert "Update gsutil to use gsutil version 5.6, python3" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit c0af61c8dd0fee6a483aacbf64a57d46ba80355e. Reason for revert: blocked on https://crrev.com/c/3440919 Original change's description: > Update gsutil to use gsutil version 5.6, python3 > > R=​gavinmak@google.com > > Bug: 1184108 > Change-Id: I933c07132006b731a97153080ebe86ed756fbdb2 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3497998 > Reviewed-by: Gavin Mak > Commit-Queue: Josip Sokcevic Bug: 1184108 Change-Id: Ifd553d12fcc25230de5ba9e6c32c8e5190cf01a8 No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/3500910 Reviewed-by: Gavin Mak Commit-Queue: Josip Sokcevic --- gsutil.py | 6 ++- gsutil.py.vpython3 | 19 --------- gsutil.vpython | 104 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 21 deletions(-) delete mode 100644 gsutil.py.vpython3 create mode 100644 gsutil.vpython diff --git a/gsutil.py b/gsutil.py index 90265cf6b..61aaafe1f 100755 --- a/gsutil.py +++ b/gsutil.py @@ -34,7 +34,7 @@ DEFAULT_BIN_DIR = os.path.join(THIS_DIR, 'external_bin', 'gsutil') IS_WINDOWS = os.name == 'nt' -VERSION = '5.6' +VERSION = '4.28' class InvalidGsutilError(Exception): @@ -166,7 +166,9 @@ def run_gsutil(target, args, clean=False): assert sys.platform != 'cygwin' cmd = [ - sys.executable, + 'vpython', + '-vpython-spec', os.path.join(THIS_DIR, 'gsutil.vpython'), + '--', gsutil_bin ] + args_opt + args return subprocess.call(cmd, shell=IS_WINDOWS) diff --git a/gsutil.py.vpython3 b/gsutil.py.vpython3 deleted file mode 100644 index a0e0a89e4..000000000 --- a/gsutil.py.vpython3 +++ /dev/null @@ -1,19 +0,0 @@ -# vpython VirtualEnv protobuf for "gsutil". -# -# See: -# https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/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. - -python_version: "3.8" - -wheel: < - name: "infra/python/wheels/crcmod/${vpython_platform}" - version: "version:1.7.chromium.3" -> diff --git a/gsutil.vpython b/gsutil.vpython new file mode 100644 index 000000000..c2e5ff7af --- /dev/null +++ b/gsutil.vpython @@ -0,0 +1,104 @@ +# vpython VirtualEnv protobuf for "gsutil". +# +# See: +# https://chromium.googlesource.com/infra/luci/luci-go/+/HEAD/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. + +python_version: "2.7" + +wheel < + name: "infra/python/wheels/google_compute_engine-py2_py3" + version: "version:2.6.2" +> +wheel < + name: "infra/python/wheels/boto-py2_py3" + version: "version:2.48.0" +> + +# "gsutil" on non-GCE can require PyOpenSSL, which, in turn, requires +# "cryptography". + +wheel: < + name: "infra/python/wheels/pyopenssl-py2_py3" + version: "version:17.2.0" +> + +## +# BEGIN "cryptography" dependencies. +## + +wheel: < + name: "infra/python/wheels/cryptography/${vpython_platform}" + version: "version:2.9.2.chromium.1" +> + +wheel: < + name: "infra/python/wheels/appdirs-py2_py3" + version: "version:1.4.3" +> + +wheel: < + name: "infra/python/wheels/enum34-py2" + version: "version:1.1.6" +> + +wheel: < + name: "infra/python/wheels/cffi/${vpython_platform}" + version: "version:1.14.5.chromium.7" +> + +wheel: < + name: "infra/python/wheels/idna-py2_py3" + version: "version:2.5" +> + +wheel: < + name: "infra/python/wheels/ipaddress-py2" + version: "version:1.0.18" +> + +wheel: < + name: "infra/python/wheels/packaging-py2_py3" + version: "version:16.8" +> + +wheel: < + name: "infra/python/wheels/pyasn1-py2_py3" + version: "version:0.2.3" +> + +wheel: < + name: "infra/python/wheels/pycparser-py2_py3" + version: "version:2.17" +> + +wheel: < + name: "infra/python/wheels/pyparsing-py2_py3" + version: "version:2.2.0" +> + +wheel: < + name: "infra/python/wheels/setuptools-py2_py3" + version: "version:34.3.2" +> + +wheel: < + name: "infra/python/wheels/six-py2_py3" + version: "version:1.10.0" +> + +## +# END "cryptography" dependencies. +## + +wheel: < + name: "infra/python/wheels/crcmod/${vpython_platform}" + version: "version:1.7.chromium.3" +>