More build rule changes for Python library
This CL does the following:
Move data dep into library rule
Add empty library rules for use in G3
Move protobuf imports into separate imports.
Change-Id: I912d3b66b2b217688bf14eb121f8232393904cc1
diff --git a/BUILD b/BUILD
index 1f74e4b..1d3357d 100644
--- a/BUILD
+++ b/BUILD
@@ -3289,12 +3289,22 @@
],
)
+# Noop targets used to represent targets of the protobuf library.
+# These will be rewritten in Google3 to be dependencies on the real targets.
+
+perfetto_py_library(
+ name = "protobuf_noop",
+ srcs = [],
+)
+
+perfetto_py_library(
+ name = "protobuf_descriptor_pb2_noop",
+ srcs = [],
+)
+
perfetto_py_binary(
name = "trace_processor_py_example",
srcs = ["src/trace_processor/python/example.py"],
- data = [
- "src/trace_processor/python/trace_processor/trace_processor.descriptor"
- ],
deps = [":trace_processor_py"],
main = "src/trace_processor/python/example.py",
python_version = "PY3",
@@ -3303,4 +3313,11 @@
perfetto_py_library(
name = "trace_processor_py",
srcs = glob(['src/trace_processor/python/trace_processor/*.py']),
+ data = [
+ "src/trace_processor/python/trace_processor/trace_processor.descriptor"
+ ],
+ deps = [
+ ":protobuf_noop",
+ ":protobuf_descriptor_pb2_noop",
+ ]
)