-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathsetup_windows.bat
More file actions
58 lines (47 loc) · 1.37 KB
/
setup_windows.bat
File metadata and controls
58 lines (47 loc) · 1.37 KB
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
51
52
53
54
55
56
57
58
@echo off
setlocal EnableDelayedExpansion
REM Save the current working directory
set "initialDir=%CD%"
REM Change to the script's directory
cd /d "%~dp0"
REM discontinue support for this script once we are delivering wheels for installing JABS with pip
REM Check for skip version check argument
set "SKIP_VERSION_CHECK=0"
for %%i in (%*) do (
if "%%~i"=="--skip-version-check" (
set "SKIP_VERSION_CHECK=1"
)
)
if "!SKIP_VERSION_CHECK!"=="0" (
REM Check for Python Installation
echo Checking for python
set "VER="
for /f "usebackq tokens=*" %%i in (`python --version 2^>nul`) do set "VER=%%i"
if "!VER!"=="" (
echo Python is not installed or not in PATH.
REM restore working directory
cd /d "%initialDir%"
exit /b 1
)
set OK=0
REM Supported versions of Python
if "!VER:~7,4!"=="3.10" set OK=1
if "!VER:~7,4!"=="3.11" set OK=1
if "!VER:~7,4!"=="3.12" set OK=1
if "!VER:~7,4!"=="3.13" set OK=1
if "!OK!"=="1" (
echo Found !VER!
) else (
echo Compatible Python not found
REM restore working directory
cd /d "%initialDir%"
exit /b 1
)
) else (
echo Skipping Python version check
)
echo Setting up Python Virtualenv...
python -m venv jabs.venv
call jabs.venv\Scripts\activate.bat && pip install .
REM restore working directory
cd /d "%initialDir%"