~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to setup.py

  • Committer: John Arbash Meinel
  • Date: 2011-05-11 11:42:36 UTC
  • mto: This revision was merged to the branch mainline in revision 5850.
  • Revision ID: john@arbash-meinel.com-20110511114236-6d3u2273w4haw9ot
Try using Cython to compile before we use Pyrex

Show diffs side-by-side

added added

removed removed

Lines of Context:
171
171
ext_modules = []
172
172
try:
173
173
    try:
 
174
        from Cython.Distutils import build_ext
 
175
        from Cython.Compiler.Version import version as pyrex_version
 
176
    except ImportError:
 
177
        print("No Cython, trying Pyrex...")
174
178
        from Pyrex.Distutils import build_ext
175
179
        from Pyrex.Compiler.Version import version as pyrex_version
176
 
    except ImportError:
177
 
        print("No Pyrex, trying Cython...")
178
 
        from Cython.Distutils import build_ext
179
 
        from Cython.Compiler.Version import version as pyrex_version
180
180
except ImportError:
181
181
    have_pyrex = False
182
182
    # try to build the extension from the prior generated source.