• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1load("//bazel:cython_library.bzl", "pyx_library")
2
3# Copyright 2021 The gRPC Authors
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9#     http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16package(default_visibility = ["//visibility:public"])
17
18genrule(
19    name = "copy_roots_pem",
20    srcs = ["//:etc/roots.pem"],
21    outs = ["_credentials/roots.pem"],
22    cmd = "cp $(SRCS) $(@)",
23)
24
25pyx_library(
26    name = "cygrpc",
27    srcs = glob([
28        "**/*.pxi",
29        "**/__init__.py",
30    ]) + [
31        "cygrpc.pxd",
32        "cygrpc.pyx",
33    ],
34    data = [":copy_roots_pem"],
35    defines = ["GRPC_DO_NOT_INSTANTIATE_POSIX_POLLER=1"],
36    deps = [
37        "//:grpc",
38    ],
39)
40