core.py 564 B

12345678910111213141516171819202122
  1. # Copyright (c) 2009-2015 Denis Bilenko and gevent contributors. See LICENSE for details.
  2. from __future__ import absolute_import
  3. import os
  4. from gevent._util import copy_globals
  5. try:
  6. if os.environ.get('GEVENT_CORE_CFFI_ONLY'):
  7. raise ImportError("Not attempting corecext")
  8. from gevent.libev import corecext as _core
  9. except ImportError:
  10. if os.environ.get('GEVENT_CORE_CEXT_ONLY'):
  11. raise
  12. # CFFI/PyPy
  13. from gevent.libev import corecffi as _core
  14. copy_globals(_core, globals())
  15. __all__ = _core.__all__ # pylint:disable=no-member