Disabling cython for now.

pull/2394/head
Nicolas "Pixel" Noble 10 years ago
parent 4547d503d3
commit 0e107a7f02
  1. 1
      src/python/requirements.txt
  2. 50
      src/python/src/setup.py
  3. 13
      tools/run_tests/python_tests.json

@ -1,4 +1,3 @@
enum34==1.0.4 enum34==1.0.4
futures==2.2.0 futures==2.2.0
protobuf==3.0.0a3 protobuf==3.0.0a3
cython>=0.22

@ -33,7 +33,6 @@ import os
import sys import sys
from distutils import core as _core from distutils import core as _core
from distutils import extension as _extension
import setuptools import setuptools
@ -54,19 +53,6 @@ _C_EXTENSION_SOURCES = (
'grpc/_adapter/_c/types/server.c', '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 = ( _EXTENSION_INCLUDE_DIRECTORIES = (
'.', '.',
) )
@ -84,44 +70,11 @@ _C_EXTENSION_MODULE = _core.Extension(
include_dirs=list(_EXTENSION_INCLUDE_DIRECTORIES), include_dirs=list(_EXTENSION_INCLUDE_DIRECTORIES),
libraries=list(_EXTENSION_LIBRARIES), libraries=list(_EXTENSION_LIBRARIES),
) )
_C_EXTENSION_MODULES = [_C_EXTENSION_MODULE] _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
_PACKAGES = ( _PACKAGES = (
'grpc', 'grpc',
'grpc._adapter', 'grpc._adapter',
'grpc._cython',
'grpc._cython._cygrpc',
'grpc._junkdrawer', 'grpc._junkdrawer',
'grpc.early_adopter', 'grpc.early_adopter',
'grpc.framework', 'grpc.framework',
@ -136,7 +89,6 @@ _PACKAGES = (
_PACKAGE_DIRECTORIES = { _PACKAGE_DIRECTORIES = {
'grpc': 'grpc', 'grpc': 'grpc',
'grpc._adapter': 'grpc/_adapter', 'grpc._adapter': 'grpc/_adapter',
'grpc._cython': 'grpc/_cython',
'grpc._junkdrawer': 'grpc/_junkdrawer', 'grpc._junkdrawer': 'grpc/_junkdrawer',
'grpc.early_adopter': 'grpc/early_adopter', 'grpc.early_adopter': 'grpc/early_adopter',
'grpc.framework': 'grpc/framework', 'grpc.framework': 'grpc/framework',

@ -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", "module": "grpc._adapter._c_test",
"pythonVersions": [ "pythonVersions": [

Loading…
Cancel
Save