Skip to content

Commit

Permalink
Merge branch 'master' into benchmark-2
Browse files Browse the repository at this point in the history
  • Loading branch information
caisq committed Mar 24, 2016
2 parents 5b1ebf1 + f9b3c9f commit ddbdc3a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
10 changes: 10 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,16 @@ while true; do
# Retry
done

## Find swig path
if [ -z "$SWIG_PATH" ]; then
SWIG_PATH=`type -p swig 2> /dev/null`
fi
if [[ ! -e "$SWIG_PATH" ]]; then
echo "Can't find swig. Ensure swig is in \$PATH or set \$SWIG_PATH."
exit 1
fi
echo "$SWIG_PATH" > tensorflow/tools/swig/swig_path

# Invoke python_config and set up symlinks to python includes
(./util/python/python_config.sh --setup "$PYTHON_BIN_PATH";) || exit -1

Expand Down
1 change: 1 addition & 0 deletions tensorflow/tools/swig/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
swig_path
10 changes: 9 additions & 1 deletion tensorflow/tools/swig/swig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,12 @@
# limitations under the License.
# ==============================================================================

swig "$@"
# If possible, read swig path out of "swig_path" generated by configure
SWIG=swig
SWIG_PATH=tensorflow/tools/swig/swig_path
if [ -e $SWIG_PATH ]; then
SWIG=`cat $SWIG_PATH`
fi

# If this line fails, rerun configure to set the path to swig correctly
"$SWIG" "$@"

0 comments on commit ddbdc3a

Please sign in to comment.