[svn r45294] Complain loudly when there is pypy without stackless

--HG--
branch : trunk
This commit is contained in:
fijal 2007-07-24 11:06:42 +02:00
parent 856c7e5695
commit c4ab38f5c9
1 changed files with 3 additions and 1 deletions

View File

@ -2,8 +2,10 @@ import sys
if '_stackless' in sys.builtin_module_names:
# when running on top of a pypy with stackless support
from _stackless import greenlet
elif hasattr(sys, 'pypy_objspaceclass'):
raise ImportError("Detected pypy without stackless support")
else:
# regular CPython (or pypy without stackless support, and then crash :-)
# regular CPython
import py
gdir = py.path.local(py.__file__).dirpath()
path = gdir.join('c-extension', 'greenlet', 'greenlet.c')