Skip to content

Commit

Permalink
Remove dependency on pybind11 in favor of rules_python.
Browse files Browse the repository at this point in the history
Per
1c23deb,
we don't actually use pybind11 except for the convenient
"@local_config_python" label. This was removed from pybind11_bazel in
favor of the one provided by rules_python:

pybind/pybind11_bazel#72

We can remove this extra dependency and do the same.
  • Loading branch information
mikex-oss committed Jun 26, 2024
1 parent abd2335 commit 76d5cc3
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 87 deletions.
2 changes: 1 addition & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ dependency_support()

load("//:init.bzl", "init")

init(python_interpreter_target = "@python39_host//:python")
init()

load("@rules_python//python:pip.bzl", "pip_parse")

Expand Down
2 changes: 1 addition & 1 deletion dependency_support/boost/add_python.patch
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ index e5d0b60..4f52d3c 100644
+ ":tuple",
+ ":type",
+ ":utility",
+ "@local_config_python//:python_headers",
+ "@rules_python//python/cc:current_py_cc_headers",
+ ],
+ copts = ["-w"],
+)
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ DEPS = [
"@boost//:python",
"@boost//:system",
"@boost//:thread",
"@local_config_python//:python_headers",
"@eigen//:eigen3",
"@rules_python//python/cc:current_py_cc_headers",
]

DEFINES = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ DEPS = [
"@boost//:system",
"@boost//:thread",
"@com_google_absl//absl/strings",
"@local_config_python//:python_headers",
"@rules_python//python/cc:current_py_cc_headers",
]

COPTS = [
Expand Down
2 changes: 0 additions & 2 deletions dependency_support/dependency_support.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ load("@rules_hdl//dependency_support/org_theopenroadproject_asap7_pdk_r1p7:org_t
load("@rules_hdl//dependency_support/org_theopenroadproject_asap7sc6t_26:org_theopenroadproject_asap7sc6t_26.bzl", "org_theopenroadproject_asap7sc6t_26")
load("@rules_hdl//dependency_support/org_theopenroadproject_asap7sc7p5t_27:org_theopenroadproject_asap7sc7p5t_27.bzl", "org_theopenroadproject_asap7sc7p5t_27")
load("@rules_hdl//dependency_support/org_theopenroadproject_asap7sc7p5t_28:org_theopenroadproject_asap7sc7p5t_28.bzl", "org_theopenroadproject_asap7sc7p5t_28")
load("@rules_hdl//dependency_support/pybind11:pybind11.bzl", "pybind11")
load("@rules_hdl//dependency_support/rules_license:rules_license.bzl", "rules_license")
load("@rules_hdl//dependency_support/tk_tcl:tk_tcl.bzl", "tk_tcl")
load("@rules_hdl//dependency_support/verilator:verilator.bzl", "verilator")
Expand Down Expand Up @@ -116,7 +115,6 @@ def dependency_support(register_toolchains = True):
org_theopenroadproject_asap7sc6t_26()
org_theopenroadproject_asap7sc7p5t_27()
org_theopenroadproject_asap7sc7p5t_28()
pybind11()
rules_license()
tk_tcl()
verilator()
Expand Down
18 changes: 0 additions & 18 deletions dependency_support/pybind11/BUILD

This file was deleted.

24 changes: 0 additions & 24 deletions dependency_support/pybind11/init_pybind11.bzl

This file was deleted.

36 changes: 0 additions & 36 deletions dependency_support/pybind11/pybind11.bzl

This file was deleted.

2 changes: 0 additions & 2 deletions init.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ load(
)
load("//dependency_support:requirements.bzl", install_pip_deps = "install_deps")
load("//dependency_support/boost:init_boost.bzl", "init_boost")
load("//dependency_support/pybind11:init_pybind11.bzl", "init_pybind11")

def init(python_interpreter = None, python_interpreter_target = None):
"""Initializes the bazel_rules_hdl workspace.
Expand Down Expand Up @@ -59,7 +58,6 @@ def init(python_interpreter = None, python_interpreter_target = None):
install_pip_deps(**install_deps_kwargs)

init_boost()
init_pybind11(python_interpreter_target = python_interpreter_target)

protobuf_deps()

Expand Down
1 change: 0 additions & 1 deletion tools/test_everything.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
'@org_theopenroadproject_asap7sc6t_26//...',
'@org_theopenroadproject_asap7sc7p5t_27//...',
'@org_theopenroadproject_asap7sc7p5t_28//...',
'@pybind11//...',
'@rules_pkg//...',
'@tk_tcl//...',
]
Expand Down

0 comments on commit 76d5cc3

Please sign in to comment.