aboutsummaryrefslogtreecommitdiff
path: root/python/tools
diff options
context:
space:
mode:
authorkste <kste@google.com>2020-04-14 10:16:58 -0700
committerCopybara-Service <copybara-worker@google.com>2020-04-14 10:17:52 -0700
commit14a9c633531425067b08774c2fe94706ab2fdde0 (patch)
tree05a0155b1447f08ff03a1b550f87f48b7032ac23 /python/tools
parent98c1e3e88e7defaf56db27f1f578988d1fdfe804 (diff)
downloadtink-14a9c633531425067b08774c2fe94706ab2fdde0.tar.gz
Fix tink_pybind_extension to include python dependencies for python targets.
PiperOrigin-RevId: 306464009
Diffstat (limited to 'python/tools')
-rw-r--r--python/tools/build_defs/tink_python_rules.bzl6
1 files changed, 5 insertions, 1 deletions
diff --git a/python/tools/build_defs/tink_python_rules.bzl b/python/tools/build_defs/tink_python_rules.bzl
index 6bebf7188..7cff9e560 100644
--- a/python/tools/build_defs/tink_python_rules.bzl
+++ b/python/tools/build_defs/tink_python_rules.bzl
@@ -44,9 +44,13 @@ def tink_pybind_extension(
deps = deps,
alwayslink = True,
)
- return native.py_library(
+
+ # Extract Python targets from deps
+ pybind_deps = [dep[:-3] for dep in deps if dep.endswith("_cc")]
+ native.py_library(
name = name,
data = [shared_lib_name],
+ deps = pybind_deps,
)
def tink_pybind_library(