1 # Copyright 2015 gRPC authors.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 # distutils: language=c++
23 # TODO(https://github.com/grpc/grpc/issues/19728) Improve how Aio Cython is
24 # distributed without breaking none compatible Python versions. For now, if
25 # Asyncio package is not available we just skip it.
28 # TODO(atash): figure out why the coverage tool gets confused about the Cython
29 # coverage plugin when the following files don't have a '.pxi' suffix.
30 include "_cygrpc/grpc_string.pyx.pxi"
31 include "_cygrpc/arguments.pyx.pxi"
32 include "_cygrpc/call.pyx.pxi"
33 include "_cygrpc/channel.pyx.pxi"
34 include "_cygrpc/channelz.pyx.pxi"
35 include "_cygrpc/credentials.pyx.pxi"
36 include "_cygrpc/completion_queue.pyx.pxi"
37 include "_cygrpc/event.pyx.pxi"
38 include "_cygrpc/metadata.pyx.pxi"
39 include "_cygrpc/operation.pyx.pxi"
40 include "_cygrpc/propagation_bits.pyx.pxi"
41 include "_cygrpc/records.pyx.pxi"
42 include "_cygrpc/security.pyx.pxi"
43 include "_cygrpc/server.pyx.pxi"
44 include "_cygrpc/tag.pyx.pxi"
45 include "_cygrpc/time.pyx.pxi"
46 include "_cygrpc/vtable.pyx.pxi"
47 include "_cygrpc/_hooks.pyx.pxi"
49 include "_cygrpc/iomgr.pyx.pxi"
51 include "_cygrpc/grpc_gevent.pyx.pxi"
53 IF UNAME_SYSNAME == "Windows":
54 include "_cygrpc/fork_windows.pyx.pxi"
56 include "_cygrpc/fork_posix.pyx.pxi"
58 # Following pxi files are part of the Aio module
59 include "_cygrpc/aio/iomgr/iomgr.pyx.pxi"
60 include "_cygrpc/aio/iomgr/socket.pyx.pxi"
61 include "_cygrpc/aio/iomgr/timer.pyx.pxi"
62 include "_cygrpc/aio/iomgr/resolver.pyx.pxi"
63 include "_cygrpc/aio/common.pyx.pxi"
64 include "_cygrpc/aio/rpc_status.pyx.pxi"
65 include "_cygrpc/aio/callback_common.pyx.pxi"
66 include "_cygrpc/aio/grpc_aio.pyx.pxi"
67 include "_cygrpc/aio/call.pyx.pxi"
68 include "_cygrpc/aio/channel.pyx.pxi"
69 include "_cygrpc/aio/server.pyx.pxi"
75 cdef extern from "Python.h":
77 int PyEval_InitThreads()
80 # We have Python callbacks called by c-core threads, this ensures the GIL
83 grpc_set_ssl_roots_override_callback(
84 <grpc_ssl_roots_override_callback>ssl_roots_override_callback)