[Bf-blender-cvs] [fe988f6c7f3] master: depsbuilder: build_deps.cmd look for pythonw rather than python

Ray Molenkamp noreply at git.blender.org
Wed Jun 15 15:47:36 CEST 2022


Commit: fe988f6c7f31b3af9876501704d43ab8e59a767b
Author: Ray Molenkamp
Date:   Wed Jun 15 07:47:28 2022 -0600
Branches: master
https://developer.blender.org/rBfe988f6c7f31b3af9876501704d43ab8e59a767b

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.

===================================================================

M	build_files/build_environment/windows/build_deps.cmd

===================================================================

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
 )



More information about the Bf-blender-cvs mailing list