diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-18 01:37:19 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-18 01:37:19 +0000 |
commit | ea6037d84eddd9185b5e3eae5ce0675f4e158b36 (patch) | |
tree | f3a84a09a1d7bd5730e7190b867caa89f5ab9380 /lldb/scripts/Python/finish-swig-Python-LLDB.sh | |
parent | 00d97ea2021f8636acec81146ae7ca50d44c8d0a (diff) | |
download | bcm5719-llvm-ea6037d84eddd9185b5e3eae5ce0675f4e158b36.tar.gz bcm5719-llvm-ea6037d84eddd9185b5e3eae5ce0675f4e158b36.zip |
[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
Diffstat (limited to 'lldb/scripts/Python/finish-swig-Python-LLDB.sh')
-rwxr-xr-x | lldb/scripts/Python/finish-swig-Python-LLDB.sh | 3 |
1 files changed, 1 insertions, 2 deletions
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 |