Merge github.com:grpc/grpc into compatibility_mode

pull/5078/head
Craig Tiller 9 years ago
commit 6456a47b18
  1. 10
      src/python/grpcio/grpc/_cython/cygrpc.pyx

@ -31,6 +31,7 @@ cimport cpython
import pkg_resources
import os.path
import sys
# TODO(atash): figure out why the coverage tool gets confused about the Cython
# coverage plugin when the following files don't have a '.pxi' suffix.
@ -50,10 +51,11 @@ cdef class _ModuleState:
cdef bint is_loaded
def __cinit__(self):
filename = pkg_resources.resource_filename(
'grpc._cython', '_windows/grpc_c.64.python')
if not pygrpc_load_core(filename):
raise ImportError('failed to load core gRPC library')
if 'win32' in sys.platform:
filename = pkg_resources.resource_filename(
'grpc._cython', '_windows/grpc_c.64.python')
if not pygrpc_load_core(filename):
raise ImportError('failed to load core gRPC library')
grpc_init()
self.is_loaded = True

Loading…
Cancel
Save