Commit c0dd02dc authored by Jason Madden's avatar Jason Madden

Prevent building on too old a PyPy; don't build on CPython if CFFI too old.

parent 845c39df
......@@ -12,6 +12,7 @@ gevent/_corecffi.o
*.egg-info
Makefile.ext
MANIFEST
*_flymake.py
greentest/.coverage\.*
greentest/htmlcov
......
......@@ -359,15 +359,22 @@ else:
setup_kwds = {}
try:
__import__('cffi')
cffi = __import__('cffi')
except ImportError:
setup_kwds = {}
else:
_min_cffi_version = (1, 3, 0)
_cffi_version_is_supported = cffi.__version_info__ >= _min_cffi_version
_kwds = {'cffi_modules': cffi_modules}
# We already checked for PyPy on Windows above and excluded it
if PYPY:
if not _cffi_version_is_supported:
raise Exception("PyPy 2.6.1 or higher is required")
setup_kwds = _kwds
elif LIBEV_EMBED and (not WIN or CFFI_WIN_BUILD_ANYWAY):
if not _cffi_version_is_supported:
print("WARNING: CFFI version 1.3.0 is required to build CFFI backend", file=sys.stderr)
else:
# If we're on CPython, we can only reliably build
# the CFFI module if we're embedding libev (in some cases
# we wind up embedding it anyway, which may not be what the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment