Ver Fonte

Delete vpython, leaving only vpython3.

Reland of https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5187892

Bug: 1376538
Change-Id: I6947cf2a54ec2b45b2540ad0784fafe73f44c441
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5343135
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Reviewed-by: Eli Ribble <eliribble@google.com>
Commit-Queue: Brian Ryner <bryner@google.com>
Brian Ryner há 1 ano atrás
pai
commit
1a92126938
8 ficheiros alterados com 37 adições e 178 exclusões
  1. 0 76
      .vpython
  2. 1 1
      cipd_manifest.txt
  3. 30 30
      cipd_manifest.versions
  4. 1 1
      gn.py
  5. 4 4
      presubmit_canned_checks.py
  6. 1 1
      presubmit_support.py
  7. 0 56
      vpython
  8. 0 9
      vpython.bat

+ 0 - 76
.vpython

@@ -1,76 +0,0 @@
-python_version: "2.7"
-
-# The default set of platforms vpython checks for does not yet include mac-arm64.
-# Setting `verify_pep425_tag` to the list of platforms we explicitly must support
-# allows us to ensure that vpython specs stay mac-arm64-friendly
-verify_pep425_tag: [
-    {python: "cp27", abi: "cp27mu", platform: "manylinux1_x86_64"},
-    {python: "cp27", abi: "cp27mu", platform: "linux_arm64"},
-    {python: "cp27", abi: "cp27mu", platform: "linux_armv6l"},
-
-    {python: "cp27", abi: "cp27m", platform: "macosx_10_10_intel"},
-    {python: "cp27", abi: "cp27m", platform: "macosx_11_0_arm64"},
-
-    {python: "cp27", abi: "cp27m", platform: "win32"},
-    {python: "cp27", abi: "cp27m", platform: "win_amd64"}
-]
-
-# Used by:
-#   auth.py
-#   gerrit_util.py
-#   git_cl.py
-#   my_activity.py
-#   TODO(crbug.com/1002153): Add ninjalog_uploader.py
-wheel: <
-  name: "infra/python/wheels/httplib2-py2_py3"
-  version: "version:0.10.3"
->
-
-# Used by:
-#    presubmit_support.py
-wheel: <
-  name: "infra/python/wheels/requests-py2_py3"
-  version: "version:2.13.0"
->
-
-# Used by:
-#   my_activity.py
-wheel: <
-  name: "infra/python/wheels/python-dateutil-py2_py3"
-  version: "version:2.7.3"
->
-wheel: <
-  name: "infra/python/wheels/six-py2_py3"
-  version: "version:1.10.0"
->
-
-# Used by:
-#   tests/auth_test.py
-#   tests/detect_host_arch_test.py
-#   tests/gclient_scm_test.py
-#   tests/gclient_test.py
-#   tests/gclient_utils_test.py
-#   tests/gerrit_util_test.py
-#   tests/git_cl_test.py
-#   tests/git_footers_test.py
-#   tests/metrics_test.py
-#   tests/presubmit_unittest.py
-#   tests/scm_unittest.py
-#   tests/subprocess2_test.py
-#   tests/watchlists_unittest.py
-wheel: <
-  name: "infra/python/wheels/mock-py2_py3"
-  version: "version:2.0.0"
->
-wheel <
-  name: "infra/python/wheels/funcsigs-py2_py3"
-  version: "version:1.0.2"
->
-wheel: <
-  name: "infra/python/wheels/pbr-py2_py3"
-  version: "version:3.0.0"
->
-wheel: <
-  name: "infra/python/wheels/six-py2_py3"
-  version: "version:1.10.0"
->

+ 1 - 1
cipd_manifest.txt

@@ -36,7 +36,7 @@ $VerifiedPlatform linux-armv6l linux-mips64 linux-mips64le linux-mipsle
 $VerifiedPlatform windows-arm64
 
 # vpython.
-infra/tools/luci/vpython/${platform} git_revision:7590083e9549cb9951034da4183ca227e3ce287b
+infra/tools/luci/vpython3/${platform} git_revision:7590083e9549cb9951034da4183ca227e3ce287b
 
 # LUCI editor
 infra/tools/luci/led/${platform} git_revision:3533cc64973555e09249964c6efbd8ad8a53f53c

+ 30 - 30
cipd_manifest.versions

@@ -385,65 +385,65 @@ infra/tools/luci/lucicfg/windows-arm64
 	git_revision:6a4656842fbff0654cb743b53ac95a9b5986509f
 	oVYUiA4SgnzWLYuKWm0dEj1GClfXckhcoQNOnyZtRUUC
 
-infra/tools/luci/vpython/linux-386
+infra/tools/luci/vpython3/linux-386
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	b5FYoVjM9uRs_ahld5zEvfiWnIq2bg3QRIRRgEwRErQC
+	FbKRJHeXfWY-OlQoAL3XVTvFbE5pOscioWy8wBnhheAC
 
-infra/tools/luci/vpython/linux-amd64
+infra/tools/luci/vpython3/linux-amd64
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	sPBrhE_Oq0jFSm1X7qwRdQVZsqjm_dh0opOuyQ60W_cC
+	ukwf9QBgSjQYXCXKB0i4wYMFzq213lUEJ8d3khB8tB0C
 
-infra/tools/luci/vpython/linux-arm64
+infra/tools/luci/vpython3/linux-arm64
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	xkX5QETiyWIlvYXVm1IXtxn5SO7u8Qwqt-jhr1ZU9j0C
+	psUIA-ihJ4UHk0MYxQl9Q_QFnL4DfmvCQAt_In-54B0C
 
-infra/tools/luci/vpython/linux-armv6l
+infra/tools/luci/vpython3/linux-armv6l
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	HH_flhED4QujkGuPzDjdIGNPgjDBtIrB-Vf_MfhAyrQC
+	r1d9GLgcct1a5Ko18n5RtXvWiT5blLzw84pHZicZ5jQC
 
-infra/tools/luci/vpython/linux-mips64
+infra/tools/luci/vpython3/linux-mips64
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	NUS0W51_4T3fNj1krKMAjN1aEIMzvmbAQOX4Pp1AL1IC
+	Wqpb-zyEQi0QEO954slqxgMMRGUm7hKkVTGGxJuJzvEC
 
-infra/tools/luci/vpython/linux-mips64le
+infra/tools/luci/vpython3/linux-mips64le
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	KKaRBtxxyFkDsBCpp-URldZSlXG0r3vubn2nt7kNRL4C
+	x7CvwRbviIhZ-hIl9Y_TWUtIy_VuTELqe7h7o0rDicUC
 
-infra/tools/luci/vpython/linux-mipsle
+infra/tools/luci/vpython3/linux-mipsle
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	wAMxOYUSY8yeiAdVXhBo-o0CQWsjmvk-vdDsHLxyeKAC
+	cmAQ9jmc1-Gtu5RgzYbga6UbSLGGHYy_4P4P68ej9E0C
 
-infra/tools/luci/vpython/linux-ppc64
+infra/tools/luci/vpython3/linux-ppc64
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	yerqVwCGs3yetFOaicEmjm2uQ_jHNxZdU-Nv7wpaE0wC
+	ntRwGROQiFo-4toTV8aUZt2TN4R-fG59Pau7LBxntFgC
 
-infra/tools/luci/vpython/linux-ppc64le
+infra/tools/luci/vpython3/linux-ppc64le
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	Zrfa57iIh1h96gzGmj96WWEqGsd02mik2MetKrf_BZkC
+	UntVgAR0NbI1QQLx-dWRq3TAGm_CKaIliQ89vUzx66EC
 
-infra/tools/luci/vpython/linux-riscv64
+infra/tools/luci/vpython3/linux-riscv64
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	roBGmCEhYkR4r3fFlx5tvkdMmb4lqJuQQgO-g7v2qVwC
+	RvxMMymCzFLgCHUr-kf7BFtjooPklV3e4vNmoRkpDp4C
 
-infra/tools/luci/vpython/linux-s390x
+infra/tools/luci/vpython3/linux-s390x
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	Id5I_J4rtiJ50zDu1OcCZ7DN8MdNNh5KHkliRR8xRwUC
+	KPGXqQaEqZAUQKpshxbPD6_-IHoMIIsGN97WhHqyynAC
 
-infra/tools/luci/vpython/mac-amd64
+infra/tools/luci/vpython3/mac-amd64
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	6nxfOwxAF6ldzO6G-nl-x_-m2NWKyJ7fDqa5LRsOCCsC
+	ttL4WulkFbvQXIRmeVCIDHxm4QmaYg-Sz3Vy79MXLNMC
 
-infra/tools/luci/vpython/mac-arm64
+infra/tools/luci/vpython3/mac-arm64
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	3_qoBuU89qbiQB9E0AVVobdGuyIqqkgiR-reo3a7SzQC
+	GWPO4sivMLPbtnuZ2S_O7jm0UuYsUs4MNAkjqxCKWosC
 
-infra/tools/luci/vpython/windows-amd64
+infra/tools/luci/vpython3/windows-amd64
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	oYwZAfM76-BKFtwCuOknYYVUj3eXgrtNwsb8fPH5Ui4C
+	e1pF-dhrzvsPSBmxyIWoJFXM5axQTdzKJcJS_Ns8bnoC
 
-infra/tools/luci/vpython/windows-arm64
+infra/tools/luci/vpython3/windows-arm64
 	git_revision:7590083e9549cb9951034da4183ca227e3ce287b
-	dKjEO5nkbsEcKcIV6jnhlHIURJY5bVe8YBjdNDUKFg4C
+	pk-sZXti1MzPrGqXdT5PjdL4siPOmgQ_wPmA70CGDqMC
 
 infra/tools/mac_toolchain/mac-amd64
 	git_revision:05fe195bf77656743f3daa99d463a794260b429b

+ 1 - 1
gn.py

@@ -55,7 +55,7 @@ def main(args):
     # Invocations of `python` from GN should never inherit the gn.py's own
     # VirtualEnv. This also helps to ensure that generated ninja files do not
     # reference python.exe from the VirtualEnv generated from depot_tools' own
-    # .vpython file (or lack thereof), but instead reference the default python
+    # .vpython3 file (or lack thereof), but instead reference the default python
     # from the PATH.
     PruneVirtualEnv()
 

+ 4 - 4
presubmit_canned_checks.py

@@ -1369,8 +1369,8 @@ def GetPylint(input_api,
         kwargs = {'env': env}
         if input_api.platform == 'win32':
             # On Windows, scripts on the current directory take precedence over
-            # PATH. When `pylint.bat` calls `vpython`, it will execute the
-            # `vpython` of the depot_tools under test instead of the one in the
+            # PATH. When `pylint.bat` calls `vpython3`, it will execute the
+            # `vpython3` of the depot_tools under test instead of the one in the
             # bot. As a workaround, we run the tests from the parent directory
             # instead.
             cwd = input_api.change.RepositoryRoot()
@@ -2117,8 +2117,8 @@ def CheckVPythonSpec(input_api, output_api, file_filter=None):
         output_api: Bag of output related interfaces.
         file_filter: Custom function that takes a path (relative to client root) and
             returns boolean, which is used to filter files for which to apply the
-            verification to. Defaults to any path ending with .vpython, which captures
-            both global .vpython and <script>.vpython files.
+            verification to. Defaults to any path ending with .vpython(3), which captures
+            both global .vpython(3) and <script>.vpython(3) files.
 
     Returns:
         A list of input_api.Command objects containing verification commands.

+ 1 - 1
presubmit_support.py

@@ -197,7 +197,7 @@ class ThreadPool(object):
 
         # On Windows, scripts on the current directory take precedence over
         # PATH, so that when testing depot_tools on Windows, calling
-        # `vpython.bat` will execute the copy of vpython of the depot_tools
+        # `vpython3.bat` will execute the copy of vpython of the depot_tools
         # under test instead of the one in the bot. As a workaround, we run the
         # tests from the parent directory instead.
         if (cmd[0] == vpython and 'cwd' in test.kwargs

+ 0 - 56
vpython

@@ -1,56 +0,0 @@
-#!/usr/bin/env bash
-
-# Copyright 2018 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# See revert instructions in cipd_manifest.txt
-
-if [[ $VPYTHON_BYPASS == "manually managed python not supported by chrome operations" ]]
-then
-  NEWARGS=()
-  while [[ $# -gt 0 ]]
-  do
-    case "$1" in
-      -vpython-tool*) # these tools all do something vpython related and quit
-        exit 0
-        ;;
-      -vpython*=*) # delete any vpython-specific flag (w/ attached argument)
-        shift
-        ;;
-      -vpython*) # delete any vpython-specific flag (w/ separate argument)
-        shift
-        shift
-        ;;
-      --)     # stop parsing
-        NEWARGS+=( "$@" )
-        break
-        ;;
-      *)      # regular arg
-        NEWARGS+=( "$1" )
-        shift
-        ;;
-    esac
-  done
-  exec "python" "${NEWARGS[@]}"
-fi
-
-# Export for other depot_tools scripts to re-use.
-export DEPOT_TOOLS_DIR="${DEPOT_TOOLS_DIR:-$(dirname "$0")}"
-export DEPOT_TOOLS_UNAME_S="${DEPOT_TOOLS_UNAME_S:-$(uname -s | tr '[:upper:]' '[:lower:]')}"
-
-source "${DEPOT_TOOLS_DIR}/cipd_bin_setup.sh"
-cipd_bin_setup &> /dev/null
-
-# Don't pass this to the Python script as it might turn around and run commands
-# in other depot_tools dirs.
-base_dir="${DEPOT_TOOLS_DIR}"
-unset DEPOT_TOOLS_DIR
-case "${DEPOT_TOOLS_UNAME_S}" in
-mingw*|cygwin*)
-  cmd.exe //c $0.bat "$@"
-  ;;
-*)
-  exec "${base_dir}/.cipd_bin/vpython" "$@"
-  ;;
-esac

+ 0 - 9
vpython.bat

@@ -1,9 +0,0 @@
-@echo off
-:: Copyright 2017 The Chromium Authors. All rights reserved.
-:: Use of this source code is governed by a BSD-style license that can be
-:: found in the LICENSE file.
-
-:: See revert instructions in cipd_manifest.txt
-
-call "%~dp0\cipd_bin_setup.bat" > nul 2>&1
-"%~dp0\.cipd_bin\vpython.exe" %*