Merge "tp: tag the no_resolvers target as avoid_dep" into main
diff --git a/python/BUILD b/python/BUILD
index 3b65af7..52a511d 100644
--- a/python/BUILD
+++ b/python/BUILD
@@ -126,6 +126,9 @@
] + PERFETTO_CONFIG.deps.pandas_py +
PERFETTO_CONFIG.deps.protobuf_py +
PERFETTO_CONFIG.deps.tp_vendor_py,
+ tags = [
+ "avoid_dep",
+ ],
)
# GN target: //python:trace_uri_resolver
diff --git a/tools/gen_bazel b/tools/gen_bazel
index 14775fc..049cf40 100755
--- a/tools/gen_bazel
+++ b/tools/gen_bazel
@@ -181,6 +181,11 @@
"PERFETTO_SHLIB_SDK_IMPLEMENTATION"
]
+# Targets with the "avoid_dep" tag;
+avoid_dep_targets = set([
+ '//python:trace_processor_py_no_resolvers',
+])
+
# Filter defines that appear in the bazel build file to only those that bazel requires.
def filter_defines(defines):
return [d for d in defines if d in bazel_required_defines]
@@ -240,6 +245,8 @@
self.populate_python_deps(target, label)
if target.name in public_python_targets:
label.visibility = ['//visibility:public']
+ if target.name in avoid_dep_targets:
+ label.tags += ['avoid_dep']
return [label]
def gen_python_binary(self, target: GnParser.Target):
@@ -346,6 +353,7 @@
self.python_version: Optional[str] = None
self.root_dir: Optional[str] = None
self.namespace: Optional[str] = None
+ self.tags: List[str] = []
def __lt__(self, other):
if isinstance(other, self.__class__):