aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Nathaniel Manista <nathaniel@google.com>2016-01-22 11:44:40 -0800
committerGravatar Nathaniel Manista <nathaniel@google.com>2016-01-22 11:44:40 -0800
commitac9e1cbe3ddd567eae4db48a17a4c72dae4ed2c1 (patch)
tree422ed9f0d598e9dd91dddcc5a12012f7a3cab500
parentd7745f09b4cfd4418fadefb699f257f99e591052 (diff)
parent14a0a93c79fab24f2fcc41aae5014bd0a5cbedf2 (diff)
Merge pull request #4830 from soltanmm/going-slightly-mad
Fix broken Python package builds.
-rw-r--r--src/python/grpcio/commands.py16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
index e1a3f4bed3..bd12c5579c 100644
--- a/src/python/grpcio/commands.py
+++ b/src/python/grpcio/commands.py
@@ -39,17 +39,7 @@ import sys
import setuptools
from setuptools.command import build_py
from setuptools.command import test
-
-# Because we need to support building without Cython but simultaneously need to
-# subclass its command class when we need to and because distutils requires a
-# special hook to acquire a command class, we attempt to import Cython's
-# build_ext, and if that fails we import setuptools'.
-try:
- # Due to the strange way Cython's Distutils module re-imports build_ext, we
- # import the build_ext class directly.
- from Cython.Distutils.build_ext import build_ext
-except ImportError:
- from setuptools.command.build_ext import build_ext
+from setuptools.command import build_ext
PYTHON_STEM = os.path.dirname(os.path.abspath(__file__))
@@ -179,7 +169,7 @@ class BuildPy(build_py.build_py):
build_py.build_py.run(self)
-class BuildExt(build_ext):
+class BuildExt(build_ext.build_ext):
"""Custom build_ext command to enable compiler-specific flags."""
C_OPTIONS = {
@@ -196,7 +186,7 @@ class BuildExt(build_ext):
if compiler in BuildExt.LINK_OPTIONS:
for extension in self.extensions:
extension.extra_link_args += list(BuildExt.LINK_OPTIONS[compiler])
- build_ext.build_extensions(self)
+ build_ext.build_ext.build_extensions(self)
class Gather(setuptools.Command):