From ea6037d84eddd9185b5e3eae5ce0675f4e158b36 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Thu, 18 Apr 2019 01:37:19 +0000 Subject: [Shell] Simplify Extracting Python Version Instead of parsing the Python version with a fairly convoluted regex, just print the major and minor version and call it a day. llvm-svn: 358635 --- lldb/scripts/Python/finish-swig-Python-LLDB.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lldb/scripts/Python') diff --git a/lldb/scripts/Python/finish-swig-Python-LLDB.sh b/lldb/scripts/Python/finish-swig-Python-LLDB.sh index 31bc2b349da..1cd17744a70 100755 --- a/lldb/scripts/Python/finish-swig-Python-LLDB.sh +++ b/lldb/scripts/Python/finish-swig-Python-LLDB.sh @@ -56,8 +56,7 @@ fi OS_NAME=`uname -s` PYTHON=${PYTHON_EXECUTABLE:-/usr/bin/env python} -PYTHON_VERSION=`${PYTHON} --version 2>&1 | sed -e 's,Python ,,' -e 's,[.][0-9],,2' -e 's,[a-z][a-z][0-9],,'` - +PYTHON_VERSION=`${PYTHON} -c 'import sys; print("{}.{}".format(sys.version_info.major, sys.version_info.minor))'` if [ $Debug -eq 1 ] then -- cgit v1.2.3