-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
118 lines (101 loc) · 3.31 KB
/
make.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
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
@SETLOCAL
@IF "%PYTHONPATH%" == "" SET PYTHONPATH=%CHDIR%
@IF "%PYTHON27_X86%" == "" SET PYTHON27_X86=c:\Python27-x86\python.exe
@IF "%PYTHON27_X64%" == "" SET PYTHON27_X64=c:\Python27-x64\python.exe
@IF "%PYTHON32_X86%" == "" SET PYTHON32_X86=c:\Python32-x86\python.exe
@IF "%PYTHON32_X64%" == "" SET PYTHON32_X64=c:\Python32-x64\python.exe
@IF "%PYTHON33_X86%" == "" SET PYTHON33_X86=c:\Python33-x86\python.exe
@IF "%PYTHON33_X64%" == "" SET PYTHON33_X64=c:\Python33-x64\python.exe
@IF "%PYTHON%" == "" SET PYTHON=%PYTHON27_X64%
@IF "%PYPY18%" == "" SET PYPY18=c:\pypy-1.8\pypy.exe
@IF "%PYPY19%" == "" SET PYPY19=c:\pypy-1.9\pypy.exe
@IF "%PYPY20%" == "" SET PYPY20=c:\pypy-2.0\pypy.exe
@IF "%IRONPYTHON27_X86%" == "" SET IRONPYTHON27_X86=c:\IronPython-2.7.3\ipy.exe
@IF "%IRONPYTHON27_X64%" == "" SET IRONPYTHON27_X64=c:\IronPython-2.7.3\ipy64.exe
@SET INTERPRETERS=%PYTHON27_X86%;%PYTHON27_X64%;%PYTHON32_X86%;^
%PYTHON32_X64%;%PYTHON33_X86%;%PYTHON33_X64%;%PYTHON%;%PYPY18%;^
%PYPY19%;%PYPY20%;%IRONPYTHON27_X86%;%IRONPYTHON27_X64%
@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...
@FOR %%A in (%INTERPRETERS%) do %%A 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
@RMDIR /S /Q build
@RMDIR /S /Q dist
@FOR /d /r . %%d in (__pycache__) do @IF EXIST "%%d" RMDIR /S /Q "%%d"
@DEL /S /Q MANIFEST
@DEL /S /Q *.pyc
@GOTO :eof
:docs
@IF "%SPHINXBUILD%" == "" SET SPHINXBUILD=C:\Python27-x64\Scripts\sphinx-build.exe
@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
:runtest
%PYTHON% -B -m openal.test.util.runtests
@GOTO :eof
:testall
@FOR /F "tokens=1 delims=" %%A in ('CHDIR') do (@SET PYTHONPATH=%%A && @SET IRONPYTHONPATH=%%A)
@FOR %%A in (%INTERPRETERS%) do @%%A -B -m openal.test.util.runtests
@GOTO :eof
@REM Do not run these in production environments. They are for testing purposes
@REM only!
:buildall
@FOR %%A in (%INTERPRETERS%) do @CALL :clean & @%%A setup.py build
@CALL :clean
@GOTO :eof
:installall
@FOR %%A in (%INTERPRETERS%) do @CALL :clean & @%%A setup.py install
@CALL :clean
@GOTO :eof
:testall2
@FOR %%A in (%INTERPRETERS%) do @%%A -B -c "import openal.test; openal.test.run()"
@GOTO :eof
:purge_installs
@echo Deleting data...
@RMDIR /S /Q C:\Python27-x86\Lib\site-packages\openal
@RMDIR /S /Q C:\Python27-x64\Lib\site-packages\openal
@RMDIR /S /Q C:\Python32-x86\Lib\site-packages\openal
@RMDIR /S /Q C:\Python32-x64\Lib\site-packages\openal
@RMDIR /S /Q C:\Python33-x86\Lib\site-packages\openal
@RMDIR /S /Q C:\Python33-x64\Lib\site-packages\openal
@RMDIR /S /Q C:\pypy-1.8\site-packages\openal
@RMDIR /S /Q C:\pypy-1.9\site-packages\openal
@RMDIR /S /Q C:\pypy-2.0\site-packages\openal
@RMDIR /S /Q C:\IronPython-2.7.3\Lib\site-packages\openal
@echo done
@GOTO :eof
@ENDLOCAL