diff --git a/WORKSPACE b/WORKSPACE index 2ae11fd9..b987149b 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -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") diff --git a/dependency_support/boost/add_python.patch b/dependency_support/boost/add_python.patch index 904b269f..a411af7e 100644 --- a/dependency_support/boost/add_python.patch +++ b/dependency_support/boost/add_python.patch @@ -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"], +) diff --git a/dependency_support/com_github_yosyshq_nextpnr/bundled.BUILD.bazel b/dependency_support/com_github_yosyshq_nextpnr/bundled.BUILD.bazel index 822c895a..78c3424c 100644 --- a/dependency_support/com_github_yosyshq_nextpnr/bundled.BUILD.bazel +++ b/dependency_support/com_github_yosyshq_nextpnr/bundled.BUILD.bazel @@ -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 = [ diff --git a/dependency_support/com_github_yosyshq_prjtrellis/bundled.BUILD.bazel b/dependency_support/com_github_yosyshq_prjtrellis/bundled.BUILD.bazel index 9949bef8..4727a1bd 100644 --- a/dependency_support/com_github_yosyshq_prjtrellis/bundled.BUILD.bazel +++ b/dependency_support/com_github_yosyshq_prjtrellis/bundled.BUILD.bazel @@ -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 = [ diff --git a/dependency_support/dependency_support.bzl b/dependency_support/dependency_support.bzl index a82d1993..6dd82360 100644 --- a/dependency_support/dependency_support.bzl +++ b/dependency_support/dependency_support.bzl @@ -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") @@ -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() diff --git a/dependency_support/pybind11/BUILD b/dependency_support/pybind11/BUILD deleted file mode 100644 index 3ae48ce2..00000000 --- a/dependency_support/pybind11/BUILD +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -package( - default_applicable_licenses = ["//:package_license"], - default_visibility = ["//visibility:private"], -) diff --git a/dependency_support/pybind11/init_pybind11.bzl b/dependency_support/pybind11/init_pybind11.bzl deleted file mode 100644 index 73246967..00000000 --- a/dependency_support/pybind11/init_pybind11.bzl +++ /dev/null @@ -1,24 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -""" pybind11 """ - -load("@pybind11_bazel//:python_configure.bzl", "python_configure") - -def init_pybind11(python_interpreter_target = None): - python_configure( - name = "local_config_python", - python_version = "3", - python_interpreter_target = python_interpreter_target, - ) diff --git a/dependency_support/pybind11/pybind11.bzl b/dependency_support/pybind11/pybind11.bzl deleted file mode 100644 index bfa893f2..00000000 --- a/dependency_support/pybind11/pybind11.bzl +++ /dev/null @@ -1,36 +0,0 @@ -# Copyright 2020 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Loads the Pybind11 Python<->C++ FFI library.""" - -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") - -def pybind11(): - maybe( - http_archive, - name = "pybind11_bazel", - strip_prefix = "pybind11_bazel-992381ced716ae12122360b0fbadbc3dda436dbf", - urls = ["https://github.com/pybind/pybind11_bazel/archive/992381ced716ae12122360b0fbadbc3dda436dbf.tar.gz"], # 2021-09-17 - sha256 = "0f7a79c25bbe1156724f64c84f6fc4cdae4713fe18bba13aa256984589e99919", - ) - - maybe( - http_archive, - name = "pybind11", - build_file = "@pybind11_bazel//:pybind11.BUILD", - strip_prefix = "pybind11-30eb39ed79d1e2eeff15219ac00773034300a5e6", - urls = ["https://github.com/pybind/pybind11/archive/30eb39ed79d1e2eeff15219ac00773034300a5e6.tar.gz"], # 2020-12-17 - sha256 = "2e748579ea1903d55b8abe9d314fd5c3cf9f4e5734c525444e4d2aed146efc9e", - ) diff --git a/init.bzl b/init.bzl index 8f813645..b56c2d08 100644 --- a/init.bzl +++ b/init.bzl @@ -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. @@ -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() diff --git a/tools/test_everything.py b/tools/test_everything.py index a8c1769d..3f06d35e 100755 --- a/tools/test_everything.py +++ b/tools/test_everything.py @@ -65,7 +65,6 @@ '@org_theopenroadproject_asap7sc6t_26//...', '@org_theopenroadproject_asap7sc7p5t_27//...', '@org_theopenroadproject_asap7sc7p5t_28//...', - '@pybind11//...', '@rules_pkg//...', '@tk_tcl//...', ]