Skip to content

Commit 5410ef8

Browse files
committed
Update dependency rules in Bazel
Signed-off-by: Yong Tang <[email protected]>
1 parent e2a2194 commit 5410ef8

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

configure.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
from __future__ import division
1919
from __future__ import print_function
2020

21-
import datetime
2221
import errno
2322
import os
2423
import platform
@@ -1234,7 +1233,6 @@ def main():
12341233

12351234
reset_tf_configure_bazelrc()
12361235
cleanup_makefile()
1237-
write_action_env_to_bazelrc("TF_CONFIG_TIME", str(datetime.datetime.now()))
12381236
setup_python(environ_cp)
12391237

12401238
if is_windows():

third_party/git/git_configure.bzl

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* `PYTHON_BIN_PATH`: location of python binary.
66
"""
77

8-
_TF_CONFIG_TIME = "TF_CONFIG_TIME"
98
_PYTHON_BIN_PATH = "PYTHON_BIN_PATH"
109

1110
def _fail(msg):
@@ -39,6 +38,11 @@ def _git_conf_impl(repository_ctx):
3938
Label("@org_tensorflow//tensorflow/tools/git:gen_git_source.py"))
4039
generated_files_path = repository_ctx.path("gen")
4140

41+
r = repository_ctx.execute(
42+
["test", "-f", "%s/.git/logs/HEAD" % tensorflow_root_path])
43+
if r.return_code == 0:
44+
unused_var = repository_ctx.path(Label("//:.git/HEAD")) # pylint: disable=unused-variable
45+
4246
result = repository_ctx.execute([
4347
_get_python_bin(repository_ctx),
4448
python_script_path, "--configure", tensorflow_root_path,
@@ -51,7 +55,6 @@ def _git_conf_impl(repository_ctx):
5155
git_configure = repository_rule(
5256
implementation = _git_conf_impl,
5357
environ = [
54-
_TF_CONFIG_TIME,
5558
_PYTHON_BIN_PATH,
5659
],
5760
)

0 commit comments

Comments
 (0)