forked from cybertec-postgresql/patroni-windows-packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install-env.bat
29 lines (22 loc) · 820 Bytes
/
install-env.bat
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
@ECHO off
setlocal enableDelayedExpansion
set "PYTHON_REF=https://www.python.org/ftp/python/3.12.3/python-3.12.3-amd64.exe"
@REM one should change python version in github action workflows when changed here
set PYTHON="python.exe"
set PIP="pip3.exe"
if "%RUNNER_TOOL_CACHE%"=="" (
echo Running on a local maching builder
set PYTHON="%ProgramFiles%\Python312\python.exe"
)
if "%RUNNER_TOOL_CACHE%"=="" (
set PIP="%ProgramFiles%\Python312\Scripts\pip3.exe"
)
echo Loading the Python installation...
curl %PYTHON_REF% --output python-install.exe
python-install.exe /quiet InstallAllUsers=1 PrependPath=1 Include_test=0 Include_launcher=0
%PYTHON% -m pip install --upgrade pip
echo Python version is:
%PYTHON% --version
echo PIP version is:
%PIP% --version
endlocal && set PYTHON=%PYTHON% && set PIP=%PIP%