diff --git a/setup.py b/setup.py index e34d2f9..1b4c75c 100644 --- a/setup.py +++ b/setup.py @@ -10,17 +10,23 @@ REQUIRES = ['six'] if sys.version_info < (2, 7): REQUIRES.append('ordereddict') -#if 'develop' not in sys.argv - +PYPY = True +CYTHON = False try: - from Cython.Distutils import build_ext - with_cython = True -except ImportError: - print('\nWARNING: Cython not installed. ' - 'Falcon modules WILL NOT be compiled with Cython.\n') - with_cython = False + sys.pypy_version_info +except AttributeError: + PYPY = False -if with_cython: +if not PYPY: + try: + from Cython.Distutils import build_ext + CYTHON = True + except ImportError: + print('\nWARNING: Cython not installed. ' + 'Falcon modules WILL NOT be compiled with Cython.\n') + CYTHON = False + +if CYTHON: ext_names = ( 'api', 'api_helpers',