Move all *support.py modules into support/*.py; fix references
This commit is contained in:
@@ -34,13 +34,13 @@ try:
|
|||||||
import greenlet
|
import greenlet
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
import pylibsupport
|
import support.pylib
|
||||||
pylibsupport.emulate()
|
support.pylib.emulate()
|
||||||
greenlet = sys.modules['greenlet']
|
greenlet = sys.modules['greenlet']
|
||||||
except ImportError:
|
except ImportError:
|
||||||
try:
|
try:
|
||||||
import stacklesssupport
|
import support.stackless
|
||||||
stacklesssupport.emulate()
|
support.stackless.emulate()
|
||||||
greenlet = sys.modules['greenlet']
|
greenlet = sys.modules['greenlet']
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise ImportError("Unable to find an implementation of greenlet.")
|
raise ImportError("Unable to find an implementation of greenlet.")
|
||||||
|
12
eventlet/support/__init__.py
Normal file
12
eventlet/support/__init__.py
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/usr/bin/python
|
||||||
|
"""\
|
||||||
|
@file __init__.py
|
||||||
|
@author Nat Goodspeed
|
||||||
|
@date 2008-03-18
|
||||||
|
@brief Make eventlet.support a subpackage
|
||||||
|
|
||||||
|
$LicenseInfo:firstyear=2008&license=internal$
|
||||||
|
Copyright (c) 2008, Linden Research, Inc.
|
||||||
|
$/LicenseInfo$
|
||||||
|
"""
|
||||||
|
|
@@ -1,5 +1,5 @@
|
|||||||
"""\
|
"""\
|
||||||
@file pylibsupport.py
|
@file support.pylib.py
|
||||||
@author Donovan Preston
|
@author Donovan Preston
|
||||||
|
|
||||||
Copyright (c) 2005-2006, Donovan Preston
|
Copyright (c) 2005-2006, Donovan Preston
|
@@ -1,5 +1,5 @@
|
|||||||
"""\
|
"""\
|
||||||
@file twistedsupport.py
|
@file support.twisted.py
|
||||||
@author Donovan Preston
|
@author Donovan Preston
|
||||||
|
|
||||||
Copyright (c) 2005-2006, Donovan Preston
|
Copyright (c) 2005-2006, Donovan Preston
|
||||||
@@ -124,7 +124,7 @@ class EventletReactor(posixbase.PosixReactorBase):
|
|||||||
|
|
||||||
def emulate():
|
def emulate():
|
||||||
if not _working:
|
if not _working:
|
||||||
raise RuntimeError, "Can't use twistedsupport because zope.interface is not installed."
|
raise RuntimeError, "Can't use support.twisted because zope.interface is not installed."
|
||||||
reactor = EventletReactor()
|
reactor = EventletReactor()
|
||||||
from twisted.internet.main import installReactor
|
from twisted.internet.main import installReactor
|
||||||
installReactor(reactor)
|
installReactor(reactor)
|
Reference in New Issue
Block a user