depsbuilder: build_deps.cmd look for pythonw rather than python

There is a check to be sure no system python is in the path
on windows to be sure deps do not accidentally build against it.

The problem arises on certain versions of windows that ship a
python.exe that just opens up the MS store to download their
python version. The check takes this to be a real python
installation and refuses to build.

This change fixes the issue by looking for pythonw.exe which a
real python install would have, but the MS store opening one that
windows ships (as of now) would not.
This commit is contained in:
Ray Molenkamp 2022-06-15 07:47:28 -06:00
parent 60bf561d37
commit fe988f6c7f

@ -48,10 +48,13 @@ if "%4" == "nobuild" set dobuild=0
REM If Python is be available certain deps may try to
REM to use this over the version we build, to prevent that
REM make sure python is NOT in the path
for %%X in (python.exe) do (set PYTHON=%%~$PATH:X)
if EXIST "%PYTHON%" (
echo PYTHON found at %PYTHON% dependencies cannot be build with python available in the path
REM make sure pythonw is NOT in the path. We look for pythonw.exe
REM since windows apparently ships a python.exe that just opens up
REM the windows store but does not ship any actual python files that
REM could cause issues.
for %%X in (pythonw.exe) do (set PYTHONW=%%~$PATH:X)
if EXIST "%PYTHONW%" (
echo PYTHON found at %PYTHONW% dependencies cannot be build with python available in the path
goto exit
)