aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Yong Tang <yong.tang.github@outlook.com>2018-01-19 19:06:49 +0000
committerGravatar Yong Tang <yong.tang.github@outlook.com>2018-01-19 19:10:36 +0000
commit5410ef84e7cb6a7a666d0c5b2fc65bee301d4da6 (patch)
tree46b185a5fcac22eb7fe92d5ebde106080a89bd44
parente2a2194cd746a0f11e97d315ee870fd7e10fd62d (diff)
Update dependency rules in Bazel
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
-rw-r--r--configure.py2
-rw-r--r--third_party/git/git_configure.bzl7
2 files changed, 5 insertions, 4 deletions
diff --git a/configure.py b/configure.py
index 88dedae5c6..cf16ef4837 100644
--- a/configure.py
+++ b/configure.py
@@ -18,7 +18,6 @@ from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
-import datetime
import errno
import os
import platform
@@ -1234,7 +1233,6 @@ def main():
reset_tf_configure_bazelrc()
cleanup_makefile()
- write_action_env_to_bazelrc("TF_CONFIG_TIME", str(datetime.datetime.now()))
setup_python(environ_cp)
if is_windows():
diff --git a/third_party/git/git_configure.bzl b/third_party/git/git_configure.bzl
index fdf1c0c36a..8e2839bdc2 100644
--- a/third_party/git/git_configure.bzl
+++ b/third_party/git/git_configure.bzl
@@ -5,7 +5,6 @@
* `PYTHON_BIN_PATH`: location of python binary.
"""
-_TF_CONFIG_TIME = "TF_CONFIG_TIME"
_PYTHON_BIN_PATH = "PYTHON_BIN_PATH"
def _fail(msg):
@@ -39,6 +38,11 @@ def _git_conf_impl(repository_ctx):
Label("@org_tensorflow//tensorflow/tools/git:gen_git_source.py"))
generated_files_path = repository_ctx.path("gen")
+ r = repository_ctx.execute(
+ ["test", "-f", "%s/.git/logs/HEAD" % tensorflow_root_path])
+ if r.return_code == 0:
+ unused_var = repository_ctx.path(Label("//:.git/HEAD")) # pylint: disable=unused-variable
+
result = repository_ctx.execute([
_get_python_bin(repository_ctx),
python_script_path, "--configure", tensorflow_root_path,
@@ -51,7 +55,6 @@ def _git_conf_impl(repository_ctx):
git_configure = repository_rule(
implementation = _git_conf_impl,
environ = [
- _TF_CONFIG_TIME,
_PYTHON_BIN_PATH,
],
)