forked from py-sdl/py-sdl2
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake.bat
More file actions
71 lines (59 loc) · 1.26 KB
/
Copy pathmake.bat
File metadata and controls
71 lines (59 loc) · 1.26 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
65
66
67
68
69
70
71
@SETLOCAL
@REM Set the PYTHON path variable to your python command, like C:\Python33\python.exe
@IF "%PYTHON%" == "" (
ECHO Warning: PYTHON environment path not set.
SET PYTHON=python
)
@IF "%~1" == "" GOTO :all
@GOTO :%~1
:all
@CALL :clean
@CALL :build
@GOTO :eof
:dist
@ECHO Creating dist...
@CALL :clean
@CALL :docs
@%PYTHON% setup.py sdist --format gztar
@%PYTHON% setup.py sdist --format zip
@GOTO :eof
:bdist
@CALL :clean
@CALL :docs
@ECHO Creating bdist...
@%PYTHON% setup.py bdist --format=msi
@GOTO :eof
:build
@ECHO Running build
@%PYTHON% setup.py build
@ECHO Build finished, invoke 'make install' to install.
@GOTO :eof
:install
@ECHO Installing...
@%PYTHON% setup.py install
@GOTO :eof
:clean
@ECHO Cleaning up...
@IF EXIST build RMDIR /S /Q build
@IF EXIST dist RMDIR /S /Q dist
@FOR /d /r . %%d in (__pycache__) do @IF EXIST "%%d" RMDIR /S /Q "%%d"
@IF EXIST MANIFEST DEL /S /Q MANIFEST
@IF EXIST *.pyc DEL /S /Q *.pyc
@GOTO :eof
:test
@%PYTHON% -B -m pytest -vvl -rxXP
@GOTO :eof
:docs
@ECHO Creating docs package
@RMDIR /S /Q doc\html
@CD doc
@CALL make html
@MOVE /Y _build\html html
@RMDIR /S /Q _build
@CALL make clean
@CD ..
@GOTO :eof
:release
@CALL :dist
@GOTO :eof
@ENDLOCAL