Blame SOURCES/coreclr-cmake-python3.patch

2a59cf
From e7c6f87f54be723724a4c996d815d59b515b01a6 Mon Sep 17 00:00:00 2001
2a59cf
From: Omair Majid <omajid@redhat.com>
2a59cf
Date: Thu, 31 Jan 2019 16:09:35 -0500
2a59cf
Subject: [PATCH] Update python lookup in CMakeLists.txt to match
2a59cf
 build.(sh|cmd) (#22145)
2a59cf
2a59cf
Use the same logic that's used in build.sh/build.cmd to lookup python:
2a59cf
first search for `python3`, then fall back to `python2` and finally to
2a59cf
`python`.
2a59cf
---
2a59cf
 CMakeLists.txt | 2 +-
2a59cf
 1 file changed, 1 insertion(+), 1 deletion(-)
2a59cf
2a59cf
diff --git a/CMakeLists.txt b/CMakeLists.txt
2a59cf
index 82c19a9cbaa..31b814f118d 100644
2a59cf
--- a/CMakeLists.txt
2a59cf
+++ b/CMakeLists.txt
2a59cf
@@ -37,7 +37,7 @@ OPTION(CLR_CMAKE_ENABLE_CODE_COVERAGE "Enable code coverage" OFF)
2a59cf
 OPTION(CLR_CMAKE_WARNINGS_ARE_ERRORS "Warnings are errors" ON)
2a59cf
 
2a59cf
 # Ensure that python is present
2a59cf
-find_program(PYTHON NAMES python2.7 python2 python)
2a59cf
+find_program(PYTHON NAMES python3 python2 python)
2a59cf
 if (PYTHON STREQUAL "PYTHON-NOTFOUND")
2a59cf
     message(FATAL_ERROR "PYTHON not found: Please install Python 2.7.9 or later from https://www.python.org/downloads/")
2a59cf
 endif()