If pybind11 is installed on the system its headers are already captured by @local_config_python//:python_headers, so the system lib only needs to depend on that. When installed correctly, includes should be #include "pybind11/...", the bundled pybind11 is based off the source repo which does not match the install paths. Use bazels strip_include_prefix to align the bundled headers correctly. Signed-off-by: Jason Zaman <jason@perfinion.com>
26 lines
608 B
Plaintext
26 lines
608 B
Plaintext
package(default_visibility = ["//visibility:public"])
|
|
|
|
cc_library(
|
|
name = "pybind11",
|
|
hdrs = glob(
|
|
include = [
|
|
"include/pybind11/*.h",
|
|
"include/pybind11/detail/*.h",
|
|
],
|
|
exclude = [
|
|
"include/pybind11/common.h",
|
|
"include/pybind11/eigen.h",
|
|
],
|
|
),
|
|
copts = [
|
|
"-fexceptions",
|
|
"-Wno-undefined-inline",
|
|
"-Wno-pragma-once-outside-header",
|
|
],
|
|
includes = ["include"],
|
|
strip_include_prefix = "include",
|
|
deps = [
|
|
"@org_tensorflow//third_party/python_runtime:headers",
|
|
],
|
|
)
|