-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmake.bat
More file actions
64 lines (53 loc) · 1.14 KB
/
make.bat
File metadata and controls
64 lines (53 loc) · 1.14 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
59
60
61
62
63
64
@ECHO OFF
pushd %~dp0
REM Simple make.bat to simplify repetitive build env management tasks under Windows
if "%1" == "install" goto install
if "%1" == "tests" goto tests
if "%1" == "doc" goto doc
if "%1" == "build" goto build
if "%1" == "clean" goto clean
if "%1" == "fresh-build" goto fresh-build
:setup
Echo ^>^>^> Setting up environment...
python -m pip install -U pip uv
goto :eof
:install
call :setup
Echo ^>^>^> Installing...
uv pip install -e .[freeze]
Echo ^>^>^> Installation complete.
goto end
:tests
call :setup
Echo ^>^>^> Installing test dependencies...
uv pip install -e .[tests]
Echo ^>^>^> Running tests...
uv run pytest
goto end
:doc
call :setup
Echo ^>^>^> Installing documentation dependencies...
uv pip install -e .[doc]
Echo ^>^>^> Building documentation...
chdir /d doc
call make.bat clean
call make.bat html
chdir /d ..
Echo ^>^>^> Documentation complete.
goto end
:build
call :setup
Echo ^>^>^> Freezing using pyinstaller
uv run pyinstaller frozen.spec
goto end
:clean
Echo ^>^>^> Cleaning up build files...
rmdir /s /q build > /NUL 2>&1
rmdir /s /q dist > /NUL 2>&1
goto end
:fresh-build
call :clean
call :build
goto end
:end
popd