You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by mp...@apache.org on 2018/05/09 20:39:17 UTC
[2/2] kudu git commit: [thirdparty] Fix thirdparty build on Python 2.6
[thirdparty] Fix thirdparty build on Python 2.6
60c8e305b introduced a change that uses a subprocess method available
only on Python 2.7+ in preflight's check_openssl() method. This commit
changes the check_openssl() internals to only use API available in
Python 2.6.
Change-Id: Ibc71d15c3e1a4ab70a78b31fe6b5de7a2cf5dbde
Reviewed-on: http://gerrit.cloudera.org:8080/10359
Reviewed-by: Mike Percy <mp...@apache.org>
Tested-by: Mike Percy <mp...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/26af97c8
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/26af97c8
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/26af97c8
Branch: refs/heads/master
Commit: 26af97c8f28d3953e7506cf96ef3991d7eee6734
Parents: 38b0c8f
Author: Attila Bukor <ab...@cloudera.com>
Authored: Wed May 9 21:46:53 2018 +0200
Committer: Mike Percy <mp...@apache.org>
Committed: Wed May 9 20:38:49 2018 +0000
----------------------------------------------------------------------
thirdparty/preflight.py | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kudu/blob/26af97c8/thirdparty/preflight.py
----------------------------------------------------------------------
diff --git a/thirdparty/preflight.py b/thirdparty/preflight.py
index cf813de..29b5775 100755
--- a/thirdparty/preflight.py
+++ b/thirdparty/preflight.py
@@ -133,14 +133,14 @@ def check_sasl():
def check_openssl():
cflags = ["-E"]
- try:
- openssl_include = subprocess.check_output(["pkg-config", "--cflags", "openssl"]).rstrip()
- if openssl_include != "":
- cflags.append(openssl_include)
- except subprocess.CalledProcessError:
- homebrew_openssl_dir="/usr/local/opt/openssl/include"
- if os.path.isdir(homebrew_openssl_dir):
- cflags.append("-I" + homebrew_openssl_dir)
+ proc = subprocess.Popen(["pkg-config", "--cflags", "openssl"], stdout=subprocess.PIPE)
+ openssl_include = proc.communicate()[0].decode("utf-8").rstrip()
+ if openssl_include != "":
+ cflags.append(openssl_include)
+ else:
+ homebrew_openssl_dir="/usr/local/opt/openssl/include"
+ if os.path.isdir(homebrew_openssl_dir):
+ cflags.append("-I" + homebrew_openssl_dir)
try_do(
"Checking for openssl headers",
("Unable to compile a simple program that uses openssl. " +