Skip to content

Commit

Permalink
Remove loop, made unnecessary by removal of support for Pyrex
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Jun 10, 2015
1 parent 8c428b5 commit 3c04762
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions setuptools/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ def _have_cython():
"""
Return True if Cython can be imported.
"""
cython_impls = 'Cython.Distutils.build_ext',
for cython_impl in cython_impls:
try:
# from (cython_impl) import build_ext
__import__(cython_impl, fromlist=['build_ext']).build_ext
return True
except Exception:
pass
cython_impl = 'Cython.Distutils.build_ext',
try:
# from (cython_impl) import build_ext
__import__(cython_impl, fromlist=['build_ext']).build_ext
return True
except Exception:
pass
return False

# for compatibility
Expand Down

0 comments on commit 3c04762

Please sign in to comment.