diff --git a/src/python/requirements.txt b/src/python/requirements.txt index 41d633a2dd6..43395df03b9 100644 --- a/src/python/requirements.txt +++ b/src/python/requirements.txt @@ -1,4 +1,3 @@ enum34==1.0.4 futures==2.2.0 protobuf==3.0.0a3 -cython>=0.22 diff --git a/src/python/src/setup.py b/src/python/src/setup.py index 2053e9a5ada..b9764bdc077 100644 --- a/src/python/src/setup.py +++ b/src/python/src/setup.py @@ -33,7 +33,6 @@ import os import sys from distutils import core as _core -from distutils import extension as _extension import setuptools @@ -54,19 +53,6 @@ _C_EXTENSION_SOURCES = ( 'grpc/_adapter/_c/types/server.c', ) -_CYTHON_EXTENSION_PACKAGE_NAMES = ( -) - -_CYTHON_EXTENSION_MODULE_NAMES = ( - 'grpc._cython.cygrpc', - 'grpc._cython._cygrpc.call', - 'grpc._cython._cygrpc.channel', - 'grpc._cython._cygrpc.completion_queue', - 'grpc._cython._cygrpc.credentials', - 'grpc._cython._cygrpc.records', - 'grpc._cython._cygrpc.server', -) - _EXTENSION_INCLUDE_DIRECTORIES = ( '.', ) @@ -84,44 +70,11 @@ _C_EXTENSION_MODULE = _core.Extension( include_dirs=list(_EXTENSION_INCLUDE_DIRECTORIES), libraries=list(_EXTENSION_LIBRARIES), ) -_C_EXTENSION_MODULES = [_C_EXTENSION_MODULE] - - -def cython_extensions(package_names, module_names, include_dirs, libraries, - build_with_cython=False): - file_extension = 'pyx' if build_with_cython else 'c' - module_files = [name.replace('.', '/') + '.' + file_extension - for name in module_names] - extensions = [ - _extension.Extension( - name=module_name, sources=[module_file], - include_dirs=include_dirs, libraries=libraries - ) for (module_name, module_file) in zip(module_names, module_files) - ] - if build_with_cython: - import Cython.Build - return Cython.Build.cythonize(extensions) - else: - return extensions - -_CYTHON_EXTENSION_MODULES = cython_extensions( - list(_CYTHON_EXTENSION_PACKAGE_NAMES), list(_CYTHON_EXTENSION_MODULE_NAMES), - list(_EXTENSION_INCLUDE_DIRECTORIES), list(_EXTENSION_LIBRARIES), - bool(_BUILD_WITH_CYTHON)) - -# TODO(atash): We shouldn't need to gate any C code based on the python version -# from the distutils build system. Remove this hackery once we're on Cython and -# 3.x C API compliant. -_EXTENSION_MODULES = list(_CYTHON_EXTENSION_MODULES) -if sys.version_info[0:2] <= (2, 7): - _EXTENSION_MODULES += _C_EXTENSION_MODULES - +_EXTENSION_MODULES = [_C_EXTENSION_MODULE] _PACKAGES = ( 'grpc', 'grpc._adapter', - 'grpc._cython', - 'grpc._cython._cygrpc', 'grpc._junkdrawer', 'grpc.early_adopter', 'grpc.framework', @@ -136,7 +89,6 @@ _PACKAGES = ( _PACKAGE_DIRECTORIES = { 'grpc': 'grpc', 'grpc._adapter': 'grpc/_adapter', - 'grpc._cython': 'grpc/_cython', 'grpc._junkdrawer': 'grpc/_junkdrawer', 'grpc.early_adopter': 'grpc/early_adopter', 'grpc.framework': 'grpc/framework', diff --git a/tools/run_tests/python_tests.json b/tools/run_tests/python_tests.json index 4da4c1b68b9..77473db2ed6 100755 --- a/tools/run_tests/python_tests.json +++ b/tools/run_tests/python_tests.json @@ -1,17 +1,4 @@ [ - { - "module": "grpc._cython.cygrpc_test", - "pythonVersions": [ - "2.7", - "3.4" - ] - }, - { - "module": "grpc._cython.adapter_low_test", - "pythonVersions": [ - "2.7" - ] - }, { "module": "grpc._adapter._c_test", "pythonVersions": [