-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootstrap.bat
More file actions
50 lines (43 loc) · 837 Bytes
/
bootstrap.bat
File metadata and controls
50 lines (43 loc) · 837 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
@echo off
setlocal
:: install uv if not already installed
where uv >nul 2>nul
if errorlevel 1 (
echo Installing uv...
winget install --id=astral-sh.uv -e
if errorlevel 1 (
echo Failed to install uv.
exit /b 1
)
) else (
echo uv is already installed.
)
:: ensure python environment
pushd %~dp0
uv python install 3.12
if errorlevel 1 (
echo Failed to install Python 3.12.
popd
exit /b 1
)
uv venv .build-env --python 3.12 --clear
if errorlevel 1 (
echo Failed to create virtual environment.
popd
exit /b 1
)
call .build-env\Scripts\activate.bat
if errorlevel 1 (
echo Failed to activate virtual environment.
popd
exit /b 1
)
uv pip install requests
if errorlevel 1 (
echo Failed to install Python packages.
popd
exit /b 1
)
popd
endlocal
exit /b 0