Author: jdevlieghere Date: Wed Apr 17 18:37:19 2019 New Revision: 358635 URL: http://llvm.org/viewvc/llvm-project?rev=358635&view=rev Log: [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. Modified: lldb/trunk/scripts/Python/finish-swig-Python-LLDB.sh Modified: lldb/trunk/scripts/Python/finish-swig-Python-LLDB.sh URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/scripts/Python/finish-swig-Python-LLDB.sh?rev=358635&r1=358634&r2=358635&view=diff ============================================================================== --- lldb/trunk/scripts/Python/finish-swig-Python-LLDB.sh (original) +++ lldb/trunk/scripts/Python/finish-swig-Python-LLDB.sh Wed Apr 17 18:37:19 2019 @@ -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 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits