[PATCH] Support python in other than /usr/bin/python
Alexey Samsonov
vonosmas at gmail.com
Thu May 21 10:30:32 PDT 2015
================
Comment at: lib/sanitizer_common/scripts/check_lint.sh:15
@@ +14,3 @@
+ if [ -x /usr/local/bin/python ]; then
+ PYTHON_EXECUTABLE=/usr/local/bin/python
+ elif PYTHON_EXECUTABLE=$(which python 2>/dev/null); then
----------------
You never set PYTHON_EXECUTABLE to /usr/bin/python, is it intentional, or you believe it would always be in PATH in this case?
================
Comment at: lib/sanitizer_common/scripts/check_lint.sh:16
@@ +15,3 @@
+ PYTHON_EXECUTABLE=/usr/local/bin/python
+ elif PYTHON_EXECUTABLE=$(which python 2>/dev/null); then
+ echo "Using python executable $PYTHON_EXECUTABLE from \$PATH."
----------------
I'd prefer to have this flattened:
if [ -z "${PYTHON_EXECUTABLE}" ] && [ -x /usr/bin/python ]; then
PYTHON_EXECUTABLE = /usr/bin/python
fi
if [ -z "${PYTHON_EXECUTABLE}" ] && [ -x /usr/bin/local/python ]; then
....
then you may also factor this out to function.
Please make sure to not introduce bash-isms.
================
Comment at: lib/sanitizer_common/scripts/check_lint.sh:17
@@ +16,3 @@
+ elif PYTHON_EXECUTABLE=$(which python 2>/dev/null); then
+ echo "Using python executable $PYTHON_EXECUTABLE from \$PATH."
+ else
----------------
Maybe, we should just print the value ${PYTHON_EXECUTABLE} if it's non-empty below?
http://reviews.llvm.org/D9914
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list