From 197230147c7636c28ebf1a49c51706cf5c1eb9f1 Mon Sep 17 00:00:00 2001 From: Geoffrey Irving Date: Fri, 4 Nov 2016 15:47:59 -0700 Subject: [PATCH] Ignore tools/git/gen and fix a bash error in python_config.sh (#5405) * Ignore tools/git/gen * Avoid bash error in python_config.sh Without this change, I get Please specify the location of python. [Default is /usr/bin/python]: Do you wish to build TensorFlow with Google Cloud Platform support? [y/N] No Google Cloud Platform support will be enabled for TensorFlow Do you wish to build TensorFlow with Hadoop File System support? [y/N] No Hadoop File System support will be enabled for TensorFlow ./util/python/python_config.sh: line 124: [: : integer expression expected Found possible Python library paths: /usr/local/lib/python2.7/dist-packages /usr/lib/python2.7/dist-packages /usr/local/buildtools/current/sitecustomize Please input the desired Python library path to use. Default is [/usr/local/lib/python2.7/dist-packages] The problem is that -eq is valid only for integers on both sides. --- tensorflow/tools/git/.gitignore | 1 + util/python/python_config.sh | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 tensorflow/tools/git/.gitignore diff --git a/tensorflow/tools/git/.gitignore b/tensorflow/tools/git/.gitignore new file mode 100644 index 00000000000..4f62b849d56 --- /dev/null +++ b/tensorflow/tools/git/.gitignore @@ -0,0 +1 @@ +gen diff --git a/util/python/python_config.sh b/util/python/python_config.sh index 02b0397760c..789c4b35b35 100755 --- a/util/python/python_config.sh +++ b/util/python/python_config.sh @@ -121,7 +121,7 @@ function setup_python { python_lib_path=($(python_path)) unset IFS - if [ 1 -eq $USE_DEFAULT_PYTHON_LIB_PATH ]; then + if [ 1 = "$USE_DEFAULT_PYTHON_LIB_PATH" ]; then PYTHON_LIB_PATH="$(default_python_path "${python_lib_path[0]}")" echo "Using python library path: $PYTHON_LIB_PATH" @@ -135,13 +135,13 @@ function setup_python { read b || true if [ "$b" == "" ]; then PYTHON_LIB_PATH="$(default_python_path "${python_lib_path[0]}")" - echo $PYTHON_LIB_PATH + echo "Using python library path: $PYTHON_LIB_PATH" else PYTHON_LIB_PATH="$b" fi fi fi - + if test -d "$PYTHON_LIB_PATH" -a -x "$PYTHON_LIB_PATH"; then python_lib="$PYTHON_LIB_PATH" else