blob: 5691420fe1c4a1e74dbff5b6a7e3358d141c72fd [file]
load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_python//python:pip.bzl", "whl_filegroup")
whl_filegroup(
name = "numpy_headers",
pattern = "numpy/_core/include/numpy",
whl = "@boost.python_pip//numpy:whl",
)
cc_library(
name = "boost.python",
srcs = glob([
"src/**/*.cpp",
]),
hdrs = glob([
"include/**/*.hpp",
]) + [
":numpy_headers",
],
defines = [
"BOOST_NUMPY_NO_LIB",
"BOOST_PYTHON_NO_LIB",
],
includes = [
"include",
"numpy_headers/numpy/_core/include",
],
local_defines = [
"BOOST_PYTHON_STATIC_LIB",
"BOOST_NUMPY_STATIC_LIB",
],
visibility = ["//visibility:public"],
deps = [
"@boost.align",
"@boost.bind",
"@boost.config",
"@boost.conversion",
"@boost.core",
"@boost.detail",
"@boost.foreach",
"@boost.function",
"@boost.graph",
"@boost.integer",
"@boost.iterator",
"@boost.lexical_cast",
"@boost.mpl",
"@boost.numeric_conversion",
"@boost.preprocessor",
"@boost.property_map",
"@boost.smart_ptr",
"@boost.static_assert",
"@boost.tuple",
"@boost.type_traits",
"@boost.utility",
"@rules_python//python/cc:current_py_cc_headers",
],
)