Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2022-06-15 16:47:28 +0300
committerRay Molenkamp <github@lazydodo.com>2022-06-15 16:47:28 +0300
commitfe988f6c7f31b3af9876501704d43ab8e59a767b (patch)
treed489ab094fc17c755eb9aad596ab8e7a0229ded4 /build_files
parent60bf561d379a108eb6d068715ff592e81717972b (diff)
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.
Diffstat (limited to 'build_files')
-rw-r--r--build_files/build_environment/windows/build_deps.cmd11
1 files changed, 7 insertions, 4 deletions
diff --git a/build_files/build_environment/windows/build_deps.cmd b/build_files/build_environment/windows/build_deps.cmd
index d836a6a3a50..d3879f3d6ae 100644
--- a/build_files/build_environment/windows/build_deps.cmd
+++ b/build_files/build_environment/windows/build_deps.cmd
@@ -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
)