def _getPythonSconsExePathWindows():
    """Find Python for Scons on Windows.

    Only 3.5 or higher will do.
    """

    # Ordered in the list of preference.
    python_dir = Execution.getPythonInstallPathWindows(supported=("3.5", "3.6",
                                                                  "3.7", "3.8",
                                                                  "3.9"))

    if python_dir is not None:
        return os.path.join(python_dir, "python.exe")
    else:
        return None
Esempio n. 2
0
def _getPythonSconsExePathWindows():
    """Find Python for Scons on Windows.

    First try a few guesses, the look into registry for user or system wide
    installations of Python2. Both Python 2.6 and 2.7, and 3.5 or higher
    will do.
    """

    # Ordered in the list of preference.
    python_dir = Execution.getPythonInstallPathWindows(supported=("2.7", "3.5",
                                                                  "3.6", "3.7",
                                                                  "3.8", "3.9",
                                                                  "2.6"))

    if python_dir is not None:
        return os.path.join(python_dir, "python.exe")
    else:
        return None