Procházet zdrojové kódy

Renamed PYTHON_EXECUTABLE to PYTHON_BINARY and added help text explaining this custom environment variable.

Signed-off-by: Chris Galvan <[email protected]>
Chris Galvan před 3 roky
rodič
revize
6f86b04c63
1 změnil soubory, kde provedl 4 přidání a 1 odebrání
  1. 4 1
      Scripts/extras/pull_and_build_from_git.py

+ 4 - 1
Scripts/extras/pull_and_build_from_git.py

@@ -119,6 +119,9 @@ for the process:
          PACKAGE_ROOT = root of the package being made (where PackageInfo.json is generated/copied)
          TARGET_INSTALL_ROOT = $PACKAGE_ROOT/$PACKAGE_NAME - usually where you target cmake install to
          TEMP_FOLDER = the temp folder.  This folder usually has subfolder 'build' and 'src'
+         PYTHON_BINARY = the path to the python binary that launched the build script. This can be useful if
+                         one of the custom build/install scripts (e.g. my_script.sh/.cmd) want to invoke
+                         a python script using the same python executable that launched the build.
          DOWNLOADED_PACKAGE_FOLDERS = semicolon seperated list of abs paths to each downloaded package Find folder.
             - usually used to set CMAKE_MODULE_PATH so it can find the packages.
             - unset if there are no dependencies declared
@@ -657,7 +660,7 @@ class BuildInfo(object):
         custom_env['TARGET_INSTALL_ROOT'] = str(self.build_install_folder.resolve())
         custom_env['PACKAGE_ROOT'] = str(self.package_install_root.resolve())
         custom_env['TEMP_FOLDER'] = str(self.base_temp_folder.resolve())
-        custom_env['PYTHON_EXECUTABLE'] = sys.executable
+        custom_env['PYTHON_BINARY'] = sys.executable
         if self.package_info.depends_on_packages:
             package_folder_list = []
             for package_name, _, subfoldername in self.package_info.depends_on_packages: