From c768fd8fc9a55f34b773998085dcf4ce119ef731 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Fri, 9 Dec 2022 13:41:06 +0000 Subject: [PATCH] Revert "Use depot_tools python3 to call ninja.py" This reverts commit 8e77bba1aebf5a675cae6ef45079a080134ebfc6. Reason for revert: Very likely caused https://crbug.com/1399811 Original change's description: > Use depot_tools python3 to call ninja.py > > This guarantees the python version used to call ninja.py. > > Bug: 1398687 > Change-Id: Ife58b285bb621dddb20b947010bc19818cd41395 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4091206 > Commit-Queue: Junji Watanabe > Reviewed-by: Nico Weber > Auto-Submit: Junji Watanabe > Commit-Queue: Nico Weber Bug: 1398687 Change-Id: I9bf469cf19134f58b3bbb44d4efa1959fe37b93f No-Presubmit: true No-Tree-Checks: true No-Try: true Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4092694 Auto-Submit: Nico Weber Commit-Queue: Rubber Stamper Bot-Commit: Rubber Stamper --- ninja | 2 +- ninja.bat | 6 ++---- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/ninja b/ninja index da4502b33..45f14e62f 100755 --- a/ninja +++ b/ninja @@ -5,4 +5,4 @@ # found in the LICENSE file. base_dir=$(dirname "$0") -PYTHONDONTWRITEBYTECODE=1 exec "$base_dir/python-bin/python3" "$base_dir/ninja.py" "$@" +PYTHONDONTWRITEBYTECODE=1 exec python3 "$base_dir/ninja.py" "$@" diff --git a/ninja.bat b/ninja.bat index 8394bd7b2..421e0a968 100644 --- a/ninja.bat +++ b/ninja.bat @@ -4,11 +4,9 @@ :: found in the LICENSE file. setlocal -set scriptdir=%~dp0 - :: Ensure that "depot_tools" is somewhere in PATH so this tool can be used :: standalone, but allow other PATH manipulations to take priority. -set PATH=%PATH%;%scriptdir% +set PATH=%PATH%;%~dp0 :: Defer control. -call %scriptdir%python-bin\python3.bat "%~dp0\ninja.py" %* +python3 "%~dp0\ninja.py" %*