Commit 8a0d686b authored by Robert Bradshaw's avatar Robert Bradshaw Committed by GitHub

Merge pull request #1478 from minrk/setuptools-import-test

check for build_ext object in import check
parents e53e5b09 a88de562
...@@ -2,16 +2,16 @@ import sys ...@@ -2,16 +2,16 @@ import sys
if 'setuptools' in sys.modules: if 'setuptools' in sys.modules:
try: try:
from setuptools.command import build_ext as _build_ext from setuptools.command.build_ext import build_ext as _build_ext
except ImportError: except ImportError:
# We may be in the process of importing setuptools, which tries # We may be in the process of importing setuptools, which tries
# to import this. # to import this.
from distutils.command import build_ext as _build_ext from distutils.command.build_ext import build_ext as _build_ext
else: else:
from distutils.command import build_ext as _build_ext from distutils.command.build_ext import build_ext as _build_ext
class build_ext(_build_ext.build_ext, object): class build_ext(_build_ext, object):
def finalize_options(self): def finalize_options(self):
if self.distribution.ext_modules: if self.distribution.ext_modules:
from Cython.Build.Dependencies import cythonize from Cython.Build.Dependencies import cythonize
......
...@@ -27,7 +27,7 @@ except Exception: ...@@ -27,7 +27,7 @@ except Exception:
if not from_setuptools and not from_pyximport: if not from_setuptools and not from_pyximport:
warnings.warn( warnings.warn(
"Cython.Distutils.old_build_ext does not properly handle dependencies " "Cython.Distutils.old_build_ext does not properly handle dependencies "
"and is deprectated.") "and is deprecated.")
try: try:
from __builtin__ import basestring from __builtin__ import basestring
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment