Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ module(
)

bazel_dep(name = "bazel_features", version = "1.36.0")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "bazel_skylib", version = "1.8.2")
bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "rules_cc", version = "0.1.4")
bazel_dep(name = "rules_python", version = "1.5.1")
bazel_dep(name = "rules_cc", version = "0.2.9")
bazel_dep(name = "rules_python", version = "1.6.3")

internal_configure = use_extension("//:internal_configure.bzl", "internal_configure_extension")
use_repo(internal_configure, "pybind11")
9 changes: 6 additions & 3 deletions build_defs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
"""Build rules for pybind11."""

load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
load("@rules_cc//cc:cc_binary.bzl", "cc_binary")
load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("@rules_cc//cc:cc_test.bzl", "cc_test")

def register_extension_info(**kwargs):
pass
Expand Down Expand Up @@ -58,7 +61,7 @@ def pybind_extension(
# Mark common dependencies as required for build_cleaner.
tags = tags + ["req_dep=%s" % dep for dep in PYBIND_DEPS]

native.cc_binary(
cc_binary(
name = name + ".so",
copts = copts + PYBIND_COPTS + select({
Label("@pybind11//:msvc_compiler"): [],
Expand Down Expand Up @@ -106,7 +109,7 @@ def pybind_library(
# Mark common dependencies as required for build_cleaner.
tags = tags + ["req_dep=%s" % dep for dep in PYBIND_DEPS]

native.cc_library(
cc_library(
name = name,
copts = copts + PYBIND_COPTS,
features = features + PYBIND_FEATURES,
Expand All @@ -127,7 +130,7 @@ def pybind_library_test(
# Mark common dependencies as required for build_cleaner.
tags = tags + ["req_dep=%s" % dep for dep in PYBIND_DEPS]

native.cc_test(
cc_test(
name = name,
copts = copts + PYBIND_COPTS,
features = features + PYBIND_FEATURES,
Expand Down
2 changes: 1 addition & 1 deletion pybind11-BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# pybind11 - Seamless operability between C++11 and Python.
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_cc//cc:cc_library.bzl", "cc_library")

licenses(["notice"])

Expand Down