diff options
author | 2017-03-10 16:12:59 -0800 | |
---|---|---|
committer | 2017-03-10 16:28:10 -0800 | |
commit | eb8bb9e461f669f299aa031634530995bc43f92b (patch) | |
tree | 44cc9cde668cf505684acd6f231a82a1be6271ff /tensorflow/contrib/graph_editor/BUILD | |
parent | 1a833fb731d0daca9a10d55dc9d9f3c4dcaeaa1e (diff) |
Replace all_files data dependencies of build_pip_package with py_library targets
Benefits of this CL:
1) Removes ~70 python unit test files from the pip wheel.
2) Makes it easier to track which files are included in the pip wheel through bazel queries.
Change: 149810103
Diffstat (limited to 'tensorflow/contrib/graph_editor/BUILD')
-rw-r--r-- | tensorflow/contrib/graph_editor/BUILD | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/tensorflow/contrib/graph_editor/BUILD b/tensorflow/contrib/graph_editor/BUILD index 6902808ed3..18ee568c16 100644 --- a/tensorflow/contrib/graph_editor/BUILD +++ b/tensorflow/contrib/graph_editor/BUILD @@ -29,6 +29,15 @@ py_library( ], ) +# Transitive dependencies of this target will be included in the pip package. +py_library( + name = "graph_editor_pip", + deps = [ + ":graph_editor_py", + ":match", + ], +) + filegroup( name = "all_files", srcs = glob( @@ -41,6 +50,13 @@ filegroup( visibility = ["//tensorflow:__subpackages__"], ) +py_library( + name = "match", + srcs = ["tests/match.py"], + srcs_version = "PY2AND3", + deps = [":graph_editor_py"], +) + py_test( name = "util_test", srcs = ["tests/util_test.py"], @@ -71,13 +87,11 @@ py_test( py_test( name = "match_test", - srcs = [ - "tests/match.py", - "tests/match_test.py", - ], + srcs = ["tests/match_test.py"], srcs_version = "PY2AND3", deps = [ ":graph_editor_py", + ":match", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", @@ -102,13 +116,11 @@ py_test( py_test( name = "reroute_test", - srcs = [ - "tests/match.py", - "tests/reroute_test.py", - ], + srcs = ["tests/reroute_test.py"], srcs_version = "PY2AND3", deps = [ ":graph_editor_py", + ":match", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", @@ -119,13 +131,11 @@ py_test( py_test( name = "edit_test", - srcs = [ - "tests/edit_test.py", - "tests/match.py", - ], + srcs = ["tests/edit_test.py"], srcs_version = "PY2AND3", deps = [ ":graph_editor_py", + ":match", "//tensorflow/python:client_testlib", "//tensorflow/python:framework_for_generated_wrappers", "//tensorflow/python:framework_test_lib", @@ -136,13 +146,11 @@ py_test( py_test( name = "transform_test", - srcs = [ - "tests/match.py", - "tests/transform_test.py", - ], + srcs = ["tests/transform_test.py"], srcs_version = "PY2AND3", deps = [ ":graph_editor_py", + ":match", "//tensorflow/python:array_ops", "//tensorflow/python:client", "//tensorflow/python:client_testlib", |