aboutsummaryrefslogtreecommitdiffstats
path: root/setuptools/extension.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2011-03-18 10:34:57 -0400
committerJason R. Coombs <jaraco@jaraco.com>2011-03-18 10:34:57 -0400
commit0cb7fa265e11dcb58dcdf3a8be4497bf3beb01a3 (patch)
tree0d66d88128a10012acff2d0c895bef5b89de7abd /setuptools/extension.py
parent8bf1bc0e657b65bdc41575f9b6b0372f77f2d7b4 (diff)
downloadexternal_python_setuptools-0cb7fa265e11dcb58dcdf3a8be4497bf3beb01a3.tar.gz
external_python_setuptools-0cb7fa265e11dcb58dcdf3a8be4497bf3beb01a3.tar.bz2
external_python_setuptools-0cb7fa265e11dcb58dcdf3a8be4497bf3beb01a3.zip
Applying patch provided by Didrik Pinte on #195 for Cython build_ext support
--HG-- branch : distribute extra : rebase_source : 69be8a07f86d1fbbdace2b7965a2c4a6cc5a14bf
Diffstat (limited to 'setuptools/extension.py')
-rw-r--r--setuptools/extension.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/setuptools/extension.py b/setuptools/extension.py
index d186c7a2..df1ef02a 100644
--- a/setuptools/extension.py
+++ b/setuptools/extension.py
@@ -3,8 +3,16 @@ from setuptools.dist import _get_unpatched
_Extension = _get_unpatched(_Extension)
try:
- from Pyrex.Distutils.build_ext import build_ext
+ # testing Cython first as it is supposed to replace pyrex
+ from Cython.Distutils.build_ext import build_ext
except ImportError:
+ try:
+ from Pyrex.Distutils.build_ext import build_ext
+ except:
+ have_pyrex = False
+ else:
+ has_pyrex = True
+
have_pyrex = False
else:
have_pyrex = True