From 19ab879e55e7e41923f7999d2f12793d849b24d0 Mon Sep 17 00:00:00 2001 From: Pete Warden Date: Thu, 31 May 2018 19:44:05 -0700 Subject: [PATCH] Manual roll back of PR #19443, because it causes the Raspberry Pi build to fail (#19678) --- tensorflow/core/platform/default/build_config.bzl | 5 +---- tensorflow/tensorflow.bzl | 4 ++-- tensorflow/tools/api/generator/BUILD | 8 +------- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/tensorflow/core/platform/default/build_config.bzl b/tensorflow/core/platform/default/build_config.bzl index 365f121..b9eb3d0 100644 --- a/tensorflow/core/platform/default/build_config.bzl +++ b/tensorflow/core/platform/default/build_config.bzl @@ -73,10 +73,7 @@ def pyx_library( outs = [filename.split(".")[0] + ".cpp"], # Optionally use PYTHON_BIN_PATH on Linux platforms so that python 3 # works. Windows has issues with cython_binary so skip PYTHON_BIN_PATH. - cmd = "PYTHONHASHSEED=0 " + select({ - "@bazel_tools//src/conditions:windows": "", - "//conditions:default": "$${PYTHON_BIN_PATH} ", - }) + "$(location @cython//:cython_binary) --cplus $(SRCS) --output-file $(OUTS)", + cmd = "PYTHONHASHSEED=0 $(location @cython//:cython_binary) --cplus $(SRCS) --output-file $(OUTS)", tools = ["@cython//:cython_binary"] + pxd_srcs, ) diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl index 2354b70..b59f8e1 100644 --- a/tensorflow/tensorflow.bzl +++ b/tensorflow/tensorflow.bzl @@ -1710,7 +1710,7 @@ def tf_version_info_genrule(): ], outs=["util/version_info.cc"], cmd= - "$${PYTHON_BIN_PATH} $(location //tensorflow/tools/git:gen_git_source.py) --generate $(SRCS) \"$@\" --git_tag_override=$${GIT_TAG_OVERRIDE:-}", + "$(location //tensorflow/tools/git:gen_git_source.py) --generate $(SRCS) \"$@\" --git_tag_override=$${GIT_TAG_OVERRIDE:-}", local=1, tools=[clean_dep("//tensorflow/tools/git:gen_git_source.py")],) @@ -1719,7 +1719,7 @@ def tf_py_build_info_genrule(): name="py_build_info_gen", outs=["platform/build_info.py"], cmd= - "$${PYTHON_BIN_PATH} $(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.py) --raw_generate \"$@\" --build_config " + if_cuda("cuda", "cpu"), local=1, tools=[clean_dep("//tensorflow/tools/build_info:gen_build_info.py")],) diff --git a/tensorflow/tools/api/generator/BUILD b/tensorflow/tools/api/generator/BUILD index 3259406..f46bb4b 100644 --- a/tensorflow/tools/api/generator/BUILD +++ b/tensorflow/tools/api/generator/BUILD @@ -122,13 +122,7 @@ genrule( "api/user_ops/__init__.py", # END GENERATED FILES ], - # Optionally use PYTHON_BIN_PATH on Linux platforms so that python 3 - # works. Windows has issues with the command so skip PYTHON_BIN_PATH - # for now. - cmd = select({ - "@bazel_tools//src/conditions:windows": "", - "//conditions:default": "$${PYTHON_BIN_PATH} ", - }) + "$(location create_python_api) $(OUTS)", + cmd = "$(location create_python_api) $(OUTS)", tools = ["create_python_api"], ) -- 2.7.4