Help build_pip_package work without ./configure
authorJustine Tunney <jart@google.com>
Wed, 4 Apr 2018 04:25:20 +0000 (21:25 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Wed, 4 Apr 2018 04:27:32 +0000 (21:27 -0700)
If the ./configure tool isn't run this script won't exist. It should
be safe to ignore this file if it isn't present since the variable
expansion below will just default to whatever python is on the PATH.

PiperOrigin-RevId: 191543995

tensorflow/tools/pip_package/build_pip_package.sh

index dc31e4c..e2d212a 100755 (executable)
@@ -160,7 +160,9 @@ function main() {
 
   # Before we leave the top-level directory, make sure we know how to
   # call python.
-  source tools/python_bin_path.sh
+  if [[ -e tools/python_bin_path.sh ]]; then
+    source tools/python_bin_path.sh
+  fi
 
   pushd ${TMPDIR}
   rm -f MANIFEST