Skip to content

Commit 1972301

Browse files
girvingVijay Vasudevan
authored and
Vijay Vasudevan
committed
Ignore tools/git/gen and fix a bash error in python_config.sh (tensorflow#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.
1 parent cf3ebad commit 1972301

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tensorflow/tools/git/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gen

util/python/python_config.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function setup_python {
121121
python_lib_path=($(python_path))
122122
unset IFS
123123

124-
if [ 1 -eq $USE_DEFAULT_PYTHON_LIB_PATH ]; then
124+
if [ 1 = "$USE_DEFAULT_PYTHON_LIB_PATH" ]; then
125125
PYTHON_LIB_PATH="$(default_python_path "${python_lib_path[0]}")"
126126
echo "Using python library path: $PYTHON_LIB_PATH"
127127

@@ -135,13 +135,13 @@ function setup_python {
135135
read b || true
136136
if [ "$b" == "" ]; then
137137
PYTHON_LIB_PATH="$(default_python_path "${python_lib_path[0]}")"
138-
echo $PYTHON_LIB_PATH
138+
echo "Using python library path: $PYTHON_LIB_PATH"
139139
else
140140
PYTHON_LIB_PATH="$b"
141141
fi
142142
fi
143143
fi
144-
144+
145145
if test -d "$PYTHON_LIB_PATH" -a -x "$PYTHON_LIB_PATH"; then
146146
python_lib="$PYTHON_LIB_PATH"
147147
else

0 commit comments

Comments
 (0)