From 8d727180beeccc7401cf1c90241b7be00e7ab3f4 Mon Sep 17 00:00:00 2001 From: sokcevic Date: Thu, 11 Mar 2021 15:19:42 +0000 Subject: [PATCH] Add python batch wrappers Bug: 777069 Change-Id: I32094c81f6050acc7e84d9eb9b1900071a937552 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/2748948 Commit-Queue: Josip Sokcevic Reviewed-by: Dirk Pranke --- python-bin/python3.bat | 11 +++++++++++ python2-bin/python2.bat | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 python-bin/python3.bat create mode 100644 python2-bin/python2.bat diff --git a/python-bin/python3.bat b/python-bin/python3.bat new file mode 100644 index 000000000..6c6f42a2f --- /dev/null +++ b/python-bin/python3.bat @@ -0,0 +1,11 @@ +@echo off +:: Copyright 2021 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. + +setlocal + +for %%d in (%~dp0..) do set PARENT_DIR=%%~fd +for /f %%i in (%PARENT_DIR%\python3_bin_reldir.txt) do set PYTHON_BIN_ABSDIR=%PARENT_DIR%\%%i +set PATH=%PYTHON_BIN_ABSDIR%;%PYTHON_BIN_ABSDIR%\Scripts;%PATH% +"%PYTHON_BIN_ABSDIR%\python3.exe" %* \ No newline at end of file diff --git a/python2-bin/python2.bat b/python2-bin/python2.bat new file mode 100644 index 000000000..9080160de --- /dev/null +++ b/python2-bin/python2.bat @@ -0,0 +1,11 @@ +@echo off +:: Copyright 2021 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. + +setlocal + +for %%d in (%~dp0..) do set PARENT_DIR=%%~fd +for /f %%i in (%PARENT_DIR%\python_bin_reldir.txt) do set PYTHON_BIN_ABSDIR=%PARENT_DIR%\%%i +set PATH=%PYTHON_BIN_ABSDIR%;%PYTHON_BIN_ABSDIR%\Scripts;%PATH% +"%PYTHON_BIN_ABSDIR%\python.exe" %* \ No newline at end of file