Make gen_build_info genrule to use a py_binary.

This makes the script more platform independent.

PiperOrigin-RevId: 217028598
This commit is contained in:
Gunhan Gulsoy 2018-10-13 23:58:31 -07:00 committed by TensorFlower Gardener
parent f868981c38
commit b47a10d0a2
4 changed files with 10 additions and 8 deletions

View File

@ -1113,7 +1113,10 @@ py_test(
], ],
main = "platform/build_info_test.py", main = "platform/build_info_test.py",
srcs_version = "PY2AND3", srcs_version = "PY2AND3",
tags = ["notap"], tags = [
"no_pip",
"notap",
],
deps = [ deps = [
":client_testlib", ":client_testlib",
":platform", ":platform",

View File

@ -1980,9 +1980,9 @@ def tf_py_build_info_genrule():
name = "py_build_info_gen", name = "py_build_info_gen",
outs = ["platform/build_info.py"], outs = ["platform/build_info.py"],
cmd = cmd =
"$(location //tensorflow/tools/build_info:gen_build_info.py) --raw_generate \"$@\" --build_config " + if_cuda("cuda", "cpu"), "$(location //tensorflow/tools/build_info:gen_build_info) --raw_generate \"$@\" --build_config " + if_cuda("cuda", "cpu"),
local = 1, local = 1,
tools = [clean_dep("//tensorflow/tools/build_info:gen_build_info.py")], tools = [clean_dep("//tensorflow/tools/build_info:gen_build_info")],
) )
def cc_library_with_android_deps( def cc_library_with_android_deps(

View File

@ -4,8 +4,8 @@ package(default_visibility = ["//tensorflow:internal"])
licenses(["notice"]) # Apache 2.0 licenses(["notice"]) # Apache 2.0
exports_files( py_binary(
glob(["gen/*"]) + [ name = "gen_build_info",
"gen_build_info.py", srcs = ["gen_build_info.py"],
], srcs_version = "PY2AND3",
) )

View File

@ -1,4 +1,3 @@
#!/usr/bin/env python
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
# #
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");