Просмотр исходного кода

Added support for being able to dynamically reference the python executable that launched the build script from the build_config.json

Signed-off-by: Chris Galvan <[email protected]>
Chris Galvan 3 лет назад
Родитель
Сommit
5404ee8c9a
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      Scripts/extras/pull_and_build_from_git.py

+ 3 - 2
Scripts/extras/pull_and_build_from_git.py

@@ -674,8 +674,9 @@ class BuildInfo(object):
         env_to_use = self.create_custom_env()
         custom_build_cmds = self.platform_config.get('custom_build_cmd', [])
         for custom_build_cmd in custom_build_cmds:
-
-            call_result = subprocess.run(custom_build_cmd,
+            # Support the user specifying {python} in the custom_build_cmd to invoke
+            # the Python executable that launched this build script
+            call_result = subprocess.run(custom_build_cmd.format(python=sys.executable),
                                          shell=True,
                                          capture_output=False,
                                          cwd=str(self.base_folder),