diff options
author | Andrew Selle <aselle@google.com> | 2016-09-06 08:19:04 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-09-06 09:32:49 -0700 |
commit | 09045e49d1e2d3322e8ca8cc40f0e5db10f13c58 (patch) | |
tree | 9719630c193394b16064f18a97cc571020c8c0ad /configure | |
parent | 8aa6d5fa256cac93fd9a88b3560599c6d103d657 (diff) |
Include sha hash in python variable __version__
It is necessary to symlink in files from .git/ in order to make
bazel aware of changes to the current head. As it is this is not
completely reliable when git repositories are in a dirty index
state. First class support for bazel git a reported bug but
not a high priority.
./configure sets up the symlinks by calling the gen_git_source.py
a bazel genrule calls gen_git_source.py to generate version_info.cc
Also changed cmake and make to build this properly.
Change: 132328009
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -2,6 +2,11 @@ DO_NOT_SUBMIT_WARNING="Unofficial setting. DO NOT SUBMIT!!!" +# Find out the absolute path to where ./configure resides +pushd `dirname $0` #> /dev/null +SOURCE_BASE_DIR=`pwd -P` +popd > /dev/null + ## Set up python-related environment settings while true; do fromuser="" @@ -68,6 +73,12 @@ 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 +# Run the gen_git_source to create links where bazel can track dependencies for +# git hash propagation +GEN_GIT_SOURCE=tensorflow/tools/git/gen_git_source.py +chmod a+x ${GEN_GIT_SOURCE} +${PYTHON_BIN_PATH} ${GEN_GIT_SOURCE} --configure ${SOURCE_BASE_DIR} + ## Set up Cuda-related environment settings while [ "$TF_NEED_CUDA" == "" ]; do |