Skip to content

Commit b7c37ef

Browse files
committed
Use Python deps from rules_python
1 parent adc7aff commit b7c37ef

6 files changed

Lines changed: 7 additions & 457 deletions

File tree

bazel/cython_library.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ def pyx_library(name, deps = [], py_deps = [], srcs = [], **kwargs):
7272
native.cc_binary(
7373
name = shared_object_name,
7474
srcs = [stem + ".cpp"],
75-
deps = deps + ["@local_config_python//:python_headers"],
75+
deps = deps + [
76+
"@rules_python//python/cc:current_py_cc_headers",
77+
"@rules_python//python/cc:current_py_cc_libs",
78+
],
7679
defines = defines,
7780
linkshared = 1,
7881
)

bazel/grpc_python_deps.bzl

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,26 +14,18 @@
1414
"""Load dependencies needed to compile and test the grpc python library as a 3rd-party consumer."""
1515

1616
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
17-
load("@com_github_grpc_grpc//third_party/py:python_configure.bzl", "python_configure")
1817

1918
# buildifier: disable=unnamed-macro
2019
def grpc_python_deps():
2120
"""Loads dependencies for gRPC Python."""
2221
if "rules_python" not in native.existing_rules():
2322
http_archive(
2423
name = "rules_python",
25-
sha256 = "9d04041ac92a0985e344235f5d946f71ac543f1b1565f2cdbc9a2aaee8adf55b",
26-
strip_prefix = "rules_python-0.26.0",
27-
url = "https://github.com/bazelbuild/rules_python/releases/download/0.26.0/rules_python-0.26.0.tar.gz",
24+
sha256 = "3b8b4cdc991bc9def8833d118e4c850f1b7498b3d65d5698eea92c3528b8cf2c",
25+
strip_prefix = "rules_python-0.30.0",
26+
url = "https://github.com/bazelbuild/rules_python/releases/download/0.30.0/rules_python-0.30.0.tar.gz",
2827
)
2928

30-
python_configure(name = "local_config_python")
31-
32-
native.bind(
33-
name = "python_headers",
34-
actual = "@local_config_python//:python_headers",
35-
)
36-
3729
if "cython" not in native.existing_rules():
3830
http_archive(
3931
name = "cython",

third_party/py/BUILD

Lines changed: 0 additions & 5 deletions
This file was deleted.

third_party/py/BUILD.tpl

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)