From f742774498616130167b779361d85933cf60c7d5 Mon Sep 17 00:00:00 2001 From: Russ Tedrake Date: Sat, 27 Oct 2018 10:04:52 -0400 Subject: [PATCH] Resolve ODR issues with manipulation_station example by including manipulation_station targets, and their dependencies, in libdrake.so. we consider this a temporary, and very imperfect, solution until in-tree examples can produce their own bindings w/o going through libdrake.so. (see #9648) --- bindings/pydrake/examples/BUILD.bazel | 3 +-- tools/install/libdrake/build_components.bzl | 1 + tools/install/libdrake/build_components_refresh.py | 8 +++++++- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/bindings/pydrake/examples/BUILD.bazel b/bindings/pydrake/examples/BUILD.bazel index f2bfb7b2468e..d2fb9853145c 100644 --- a/bindings/pydrake/examples/BUILD.bazel +++ b/bindings/pydrake/examples/BUILD.bazel @@ -63,7 +63,6 @@ drake_pybind_library( name = "manipulation_station_py", cc_deps = [ "//bindings/pydrake:documentation_pybind", - "//examples/manipulation_station", ], cc_srcs = ["manipulation_station_py.cc"], package_info = PACKAGE_INFO, @@ -140,8 +139,8 @@ drake_py_library( install( name = "install", - targets = PY_LIBRARIES, py_dest = PACKAGE_INFO.py_dest, + targets = PY_LIBRARIES, deps = get_drake_py_installs(PY_LIBRARIES_WITH_INSTALL), ) diff --git a/tools/install/libdrake/build_components.bzl b/tools/install/libdrake/build_components.bzl index de306a36a24f..be87460aff75 100644 --- a/tools/install/libdrake/build_components.bzl +++ b/tools/install/libdrake/build_components.bzl @@ -46,6 +46,7 @@ LIBDRAKE_COMPONENTS = [ "//common/trajectories", "//common:drake_marker_shared_library", # unpackaged "//common:text_logging_gflags_h", # unpackaged + "//examples/manipulation_station:station_simulation", # unpackaged "//geometry", "//geometry/dev", "//geometry/dev/render", diff --git a/tools/install/libdrake/build_components_refresh.py b/tools/install/libdrake/build_components_refresh.py index 414533bc4dde..2ff41e4490f5 100755 --- a/tools/install/libdrake/build_components_refresh.py +++ b/tools/install/libdrake/build_components_refresh.py @@ -30,12 +30,18 @@ def _bazel_query(args): def _find_libdrake_components(): # This forms the set of cc_library targets that will be installed. + # TODO(russt/eric-cousineau/jwnimmer): Remove any examples from + # libdrake.so, pending resolution of #9648. components_query = """ kind("cc_library", visible("//tools/install/libdrake:libdrake.so", "//...")) except(attr("testonly", "1", "//...")) except("//:*") except("//bindings/pydrake/...") - except("//examples/...") + except( + "//examples/..." except( + "//examples/manipulation_station/..." + ) + ) except("//lcmtypes/...") except("//tools/install/libdrake:*") except(attr(tags, "exclude_from_libdrake", //...))