Blame SOURCES/coreclr-build-python3.patch

105ad9
From 7e0608fee5cacbf5bf7d0c3886e2fcb1a9d10754 Mon Sep 17 00:00:00 2001
105ad9
From: Omair Majid <omajid@redhat.com>
105ad9
Date: Wed, 9 Jan 2019 12:28:48 -0500
105ad9
Subject: [PATCH] Support building with python3 on unix (#19356)
105ad9
105ad9
The windows build scripts try finding python in order of python3,
105ad9
python2 and then python. The unix build scripts dont. They just try
105ad9
python2 variants and then fail. This change makes brings them closer
105ad9
together by letting users build using only python3.
105ad9
---
105ad9
 build.sh | 6 +++---
105ad9
 1 file changed, 3 insertions(+), 3 deletions(-)
105ad9
105ad9
diff --git a/build.sh b/build.sh
105ad9
index a0b1742effb..14452ad5ac5 100755
105ad9
--- a/build.sh
105ad9
+++ b/build.sh
105ad9
@@ -7,9 +7,9 @@ export ghprbCommentBody=
105ad9
 
105ad9
 # resolve python-version to use
105ad9
 if [ "$PYTHON" == "" ] ; then
105ad9
-    if ! PYTHON=$(command -v python2.7 || command -v python2 || command -v python)
105ad9
+    if ! PYTHON=$(command -v python3 || command -v python2 || command -v python)
105ad9
     then
105ad9
-       echo "Unable to locate build-dependency python2.x!" 1>&2
105ad9
+       echo "Unable to locate build-dependency python!" 1>&2
105ad9
        exit 1
105ad9
     fi
105ad9
 fi
105ad9
@@ -17,7 +17,7 @@ fi
105ad9
 # useful in case of explicitly set option.
105ad9
 if ! command -v $PYTHON > /dev/null
105ad9
 then
105ad9
-   echo "Unable to locate build-dependency python2.x ($PYTHON)!" 1>&2
105ad9
+   echo "Unable to locate build-dependency python ($PYTHON)!" 1>&2
105ad9
    exit 1
105ad9
 fi
105ad9