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.
This commit is contained in:
Geoffrey Irving 2016-11-04 15:47:59 -07:00 committed by Vijay Vasudevan
parent cf3ebad6d4
commit 197230147c
2 changed files with 4 additions and 3 deletions

1
tensorflow/tools/git/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
gen

View File

@ -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