From 527dc30f42eb0a334f1bd1c468147f1b33249eb5 Mon Sep 17 00:00:00 2001 From: Cole Faust Date: Tue, 10 Sep 2024 10:03:36 -0700 Subject: [PATCH] Revert "Add BUILD_BROKEN_PYTHON_IS_PYTHON2" This reverts commit b1fbc7920676a1bfe44bf615be88118a305d51a1. Removing the build broken flag to progress the python3 migration. It's been here for over a year and I haven't heard of any users. Bug: 203436762 Test: Presubmits Change-Id: Icfd2d25986abda934c60fd868ed5525dc384fbf3 --- ui/build/path.go | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/ui/build/path.go b/ui/build/path.go index 075bf2eb7..cc1d7e9c2 100644 --- a/ui/build/path.go +++ b/ui/build/path.go @@ -125,15 +125,6 @@ func SetupLitePath(ctx Context, config Config, tmpDir string) { prebuiltsPath, _ := filepath.Abs("prebuilts/build-tools/path/" + runtime.GOOS + "-x86") myPath = prebuiltsPath + string(os.PathListSeparator) + myPath - if value, _ := config.Environment().Get("BUILD_BROKEN_PYTHON_IS_PYTHON2"); value == "true" { - py2Path, _ := filepath.Abs("prebuilts/build-tools/path/" + runtime.GOOS + "-x86/py2") - if info, err := os.Stat(py2Path); err == nil && info.IsDir() { - myPath = py2Path + string(os.PathListSeparator) + myPath - } - } else if value != "" { - ctx.Fatalf("BUILD_BROKEN_PYTHON_IS_PYTHON2 can only be set to 'true' or an empty string, but got %s\n", value) - } - // Set $PATH to be the directories containing the host tool symlinks, and // the prebuilts directory for the current host OS. config.Environment().Set("PATH", myPath) @@ -270,15 +261,6 @@ func SetupPath(ctx Context, config Config) { prebuiltsPath, _ := filepath.Abs("prebuilts/build-tools/path/" + runtime.GOOS + "-x86") myPath = prebuiltsPath + string(os.PathListSeparator) + myPath - if value, _ := config.Environment().Get("BUILD_BROKEN_PYTHON_IS_PYTHON2"); value == "true" { - py2Path, _ := filepath.Abs("prebuilts/build-tools/path/" + runtime.GOOS + "-x86/py2") - if info, err := os.Stat(py2Path); err == nil && info.IsDir() { - myPath = py2Path + string(os.PathListSeparator) + myPath - } - } else if value != "" { - ctx.Fatalf("BUILD_BROKEN_PYTHON_IS_PYTHON2 can only be set to 'true' or an empty string, but got %s\n", value) - } - // Replace the $PATH variable with the path_interposer symlinks, and // checked-in prebuilts. config.Environment().Set("PATH", myPath)