This is an automated email from the ASF dual-hosted git repository.
alexey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kudu.git
The following commit(s) were added to refs/heads/master by this push:
new a2ee327 [thirdparty] python3 is good for building LLVM
a2ee327 is described below
commit a2ee327a88c23c039544a4e82be10ed8f2f51503
Author: Alexey Serbin <[email protected]>
AuthorDate: Thu Mar 19 15:20:16 2020 -0700
[thirdparty] python3 is good for building LLVM
With python2 deprecation, contemporary OS provide python3 as the default
choice: use it to build LLVM instead of building python2 in thirdparty.
Change-Id: Ib9e01da29595af5d1d7ed78e1794325df2dacf55
Reviewed-on: http://gerrit.cloudera.org:8080/15504
Reviewed-by: Adar Dembo <[email protected]>
Tested-by: Kudu Jenkins
---
thirdparty/build-definitions.sh | 9 ++++++---
thirdparty/vars.sh | 5 +++--
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/thirdparty/build-definitions.sh b/thirdparty/build-definitions.sh
index 19a4822..56e46dc 100644
--- a/thirdparty/build-definitions.sh
+++ b/thirdparty/build-definitions.sh
@@ -158,10 +158,13 @@ build_or_find_python() {
fi
# Build Python only if necessary.
- if [[ $(python2.7 -V 2>&1) =~ "Python 2.7." ]]; then
- PYTHON_EXECUTABLE=$(which python2.7)
- elif [[ $(python -V 2>&1) =~ "Python 2.7." ]]; then
+ if [[ $(python3 -V 2>&1) =~ "Python 3." ]]; then
+ PYTHON_EXECUTABLE=$(which python3)
+ elif [[ $(python -V 2>&1) =~ "Python 3." ||
+ $(python -V 2>&1) =~ "Python 2.7." ]]; then
PYTHON_EXECUTABLE=$(which python)
+ elif [[ $(python2 -V 2>&1) =~ "Python 2.7." ]]; then
+ PYTHON_EXECUTABLE=$(which python2)
else
PYTHON_BDIR=$TP_BUILD_DIR/$PYTHON_NAME$MODE_SUFFIX
mkdir -p $PYTHON_BDIR
diff --git a/thirdparty/vars.sh b/thirdparty/vars.sh
index 605171a..b182438 100644
--- a/thirdparty/vars.sh
+++ b/thirdparty/vars.sh
@@ -150,8 +150,9 @@ LLVM_SOURCE=$TP_SOURCE_DIR/$LLVM_NAME
# The include-what-you-use is built along with LLVM in its source tree.
IWYU_VERSION=0.13
-# Python 2.7 is required to build LLVM 3.6+. It is only built and installed if
-# the system Python version is not 2.7.
+# Python is required to build LLVM 3.6+ because it uses
+# llvm/utils/llvm-build/llvmbuild script. It is only built and installed if
+# the system Python version is less than 2.7.
PYTHON_VERSION=2.7.13
PYTHON_NAME=python-$PYTHON_VERSION
PYTHON_SOURCE=$TP_SOURCE_DIR/$PYTHON_NAME