2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-21 17:35:55 +01:00

waf.bat changed to support Python3 installation on Windows.

This commit is contained in:
WaffleSouffle 2017-04-04 17:20:05 +01:00 committed by Thomas Nagy
parent 68bd42b235
commit 30d0673873

View File

@ -425,7 +425,7 @@ def create_waf(self, *k, **kw):
if sys.platform == 'win32' or Options.options.make_batch:
f = open('waf.bat', 'w')
try:
f.write('@python -x "%~dp0waf" %*\n@exit /b %ERRORLEVEL%\n')
f.write('@setlocal\n@set PYEXE=python\n@where %PYEXE% 1>NUL 2>NUL\n@if %ERRORLEVEL% neq 0 set PYEXE=py\n@%PYEXE% -x "%~dp0waf" %*\n@exit /b %ERRORLEVEL%\n')
finally:
f.close()