diff options
Diffstat (limited to 'src/python/src/setup.py')
-rw-r--r-- | src/python/src/setup.py | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/src/python/src/setup.py b/src/python/src/setup.py index 5398b09936..a857ae98cc 100644 --- a/src/python/src/setup.py +++ b/src/python/src/setup.py @@ -29,11 +29,19 @@ """A setup module for the GRPC Python package.""" +import os +import sys + from distutils import core as _core import setuptools -import sys -_EXTENSION_SOURCES = ( + +# Use environment variables to determine whether or not the Cython extension +# should *use* Cython or use the generated C files. Note that this requires the +# C files to have been generated by building first *with* Cython support. +_BUILD_WITH_CYTHON = os.environ.get('GRPC_PYTHON_BUILD_WITH_CYTHON', False) + +_C_EXTENSION_SOURCES = ( 'grpc/_adapter/_c/module.c', 'grpc/_adapter/_c/types.c', 'grpc/_adapter/_c/utility.c', @@ -56,16 +64,19 @@ _EXTENSION_LIBRARIES = ( if not "darwin" in sys.platform: _EXTENSION_LIBRARIES += ('rt',) -_EXTENSION_MODULE = _core.Extension( - 'grpc._adapter._c', sources=list(_EXTENSION_SOURCES), + +_C_EXTENSION_MODULE = _core.Extension( + 'grpc._adapter._c', sources=list(_C_EXTENSION_SOURCES), include_dirs=list(_EXTENSION_INCLUDE_DIRECTORIES), libraries=list(_EXTENSION_LIBRARIES), - ) +) +_EXTENSION_MODULES = [_C_EXTENSION_MODULE] _PACKAGES = ( 'grpc', 'grpc._adapter', 'grpc._junkdrawer', + 'grpc._links', 'grpc.early_adopter', 'grpc.framework', 'grpc.framework.alpha', @@ -74,20 +85,23 @@ _PACKAGES = ( 'grpc.framework.face', 'grpc.framework.face.testing', 'grpc.framework.foundation', + 'grpc.framework.interfaces', + 'grpc.framework.interfaces.links', ) _PACKAGE_DIRECTORIES = { 'grpc': 'grpc', 'grpc._adapter': 'grpc/_adapter', 'grpc._junkdrawer': 'grpc/_junkdrawer', + 'grpc._links': 'grpc/_links', 'grpc.early_adopter': 'grpc/early_adopter', 'grpc.framework': 'grpc/framework', } setuptools.setup( name='grpcio', - version='0.9.0a1', - ext_modules=[_EXTENSION_MODULE], + version='0.10.0a0', + ext_modules=_EXTENSION_MODULES, packages=list(_PACKAGES), package_dir=_PACKAGE_DIRECTORIES, install_requires=[ |