xref: /aosp_15_r20/external/executorch/install_requirements.bat (revision 523fa7a60841cd1ecfb9cc4201f1ca8b03ed023a)
1*523fa7a6SAndroid Build Coastguard Worker@ECHO OFF
2*523fa7a6SAndroid Build Coastguard Worker
3*523fa7a6SAndroid Build Coastguard Workerrem Copyright (c) Meta Platforms, Inc. and affiliates.
4*523fa7a6SAndroid Build Coastguard Workerrem All rights reserved.
5*523fa7a6SAndroid Build Coastguard Worker
6*523fa7a6SAndroid Build Coastguard Workerrem This batch file provides a basic functionality similar to the bash script.
7*523fa7a6SAndroid Build Coastguard Worker
8*523fa7a6SAndroid Build Coastguard Workercd /d "%~dp0"
9*523fa7a6SAndroid Build Coastguard Worker
10*523fa7a6SAndroid Build Coastguard Workerrem Find the names of the python tools to use (replace with your actual python installation)
11*523fa7a6SAndroid Build Coastguard Workerif "%PYTHON_EXECUTABLE%"=="" (
12*523fa7a6SAndroid Build Coastguard Worker  if "%CONDA_DEFAULT_ENV%"=="" OR "%CONDA_DEFAULT_ENV%"=="base" OR NOT EXIST "python" (
13*523fa7a6SAndroid Build Coastguard Worker    set PYTHON_EXECUTABLE=python3
14*523fa7a6SAndroid Build Coastguard Worker  ) else (
15*523fa7a6SAndroid Build Coastguard Worker    set PYTHON_EXECUTABLE=python
16*523fa7a6SAndroid Build Coastguard Worker  )
17*523fa7a6SAndroid Build Coastguard Worker)
18*523fa7a6SAndroid Build Coastguard Worker
19*523fa7a6SAndroid Build Coastguard Worker"%PYTHON_EXECUTABLE%" install_requirements.py %*
20*523fa7a6SAndroid Build Coastguard Worker
21*523fa7a6SAndroid Build Coastguard Workerexit /b %ERRORLEVEL%