summaryrefslogtreecommitdiff
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
commit24068341363d85e79af420dbbd89512986154e81 (patch)
tree3721c3f6dd201a66c9b5ea04e8a2f2c86e1d067b /setuptools/extension.py
parent27e40a14b40eeb2fa756c7c844ebba39660046d9 (diff)
downloadpython-setuptools-bitbucket-24068341363d85e79af420dbbd89512986154e81.tar.gz
Applying patch provided by Didrik Pinte on #195 for Cython build_ext support
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