Files
chromium_depot_tools/python-bin/python3.bat
Fumitoshi Ukai e6596746dc better error message from python3 when not initialized
Bug: 414330998
Change-Id: I47fcd9571ba3de0a080e31624f9bdf0fa738914a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6498079
Auto-Submit: Fumitoshi Ukai <ukai@google.com>
Commit-Queue: Gavin Mak <gavinmak@google.com>
Reviewed-by: Takuto Ikuta <tikuta@chromium.org>
Reviewed-by: Gavin Mak <gavinmak@google.com>
2025-04-30 10:26:53 -07:00

19 lines
653 B
Batchfile

@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
IF NOT EXIST "%PARENT_DIR%\python3_bin_reldir.txt" (
echo python3_bin_reldir.txt not found. need to initialize depot_tools by >&2
echo running gclient or update_depot_tools >&2
exit /b 1
)
:Initialized
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" %*