aboutsummaryrefslogtreecommitdiffhomepage
path: root/util
diff options
context:
space:
mode:
authorGravatar Benoit Steiner <bsteiner@google.com>2016-11-09 13:14:03 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-11-09 13:48:22 -0800
commita771598ad83ca33eb42594d7e804859371ba4ca9 (patch)
tree753237f3b4d22e1760084df1ea37975076d387ea /util
parentf0e9bd3c55868eb0a1f61f8cfb2b94ce011e47b4 (diff)
Merge changes from github.
Change: 138675832
Diffstat (limited to 'util')
-rwxr-xr-xutil/python/python_config.sh28
1 files changed, 18 insertions, 10 deletions
diff --git a/util/python/python_config.sh b/util/python/python_config.sh
index 8a780c82b8..789c4b35b3 100755
--- a/util/python/python_config.sh
+++ b/util/python/python_config.sh
@@ -120,20 +120,28 @@ function setup_python {
IFS=','
python_lib_path=($(python_path))
unset IFS
- echo "Found possible Python library paths:"
- for x in "${python_lib_path[@]}"; do
- echo " $x"
- done
- set -- "${python_lib_path[@]}"
- echo "Please input the desired Python library path to use. Default is ["$1"]"
- read b || true
- if [ "$b" == "" ]; then
+
+ if [ 1 = "$USE_DEFAULT_PYTHON_LIB_PATH" ]; 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"
+ echo "Found possible Python library paths:"
+ for x in "${python_lib_path[@]}"; do
+ echo " $x"
+ done
+ set -- "${python_lib_path[@]}"
+ echo "Please input the desired Python library path to use. Default is ["$1"]"
+ read b || true
+ if [ "$b" == "" ]; then
+ PYTHON_LIB_PATH="$(default_python_path "${python_lib_path[0]}")"
+ 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