diff --git a/eventlet/api.py b/eventlet/api.py index 4ded121..41fcb61 100644 --- a/eventlet/api.py +++ b/eventlet/api.py @@ -34,13 +34,13 @@ try: import greenlet except ImportError: try: - import pylibsupport - pylibsupport.emulate() + import support.pylib + support.pylib.emulate() greenlet = sys.modules['greenlet'] except ImportError: try: - import stacklesssupport - stacklesssupport.emulate() + import support.stackless + support.stackless.emulate() greenlet = sys.modules['greenlet'] except ImportError: raise ImportError("Unable to find an implementation of greenlet.") diff --git a/eventlet/support/__init__.py b/eventlet/support/__init__.py new file mode 100644 index 0000000..707d276 --- /dev/null +++ b/eventlet/support/__init__.py @@ -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$ +""" + diff --git a/eventlet/nginx_mod_wsgi_support.py b/eventlet/support/nginx_mod_wsgi.py similarity index 100% rename from eventlet/nginx_mod_wsgi_support.py rename to eventlet/support/nginx_mod_wsgi.py diff --git a/eventlet/pylibsupport.py b/eventlet/support/pylib.py similarity index 98% rename from eventlet/pylibsupport.py rename to eventlet/support/pylib.py index 1378e7a..bc135ba 100644 --- a/eventlet/pylibsupport.py +++ b/eventlet/support/pylib.py @@ -1,5 +1,5 @@ """\ -@file pylibsupport.py +@file support.pylib.py @author Donovan Preston Copyright (c) 2005-2006, Donovan Preston diff --git a/eventlet/stacklesssupport.py b/eventlet/support/stackless.py similarity index 100% rename from eventlet/stacklesssupport.py rename to eventlet/support/stackless.py diff --git a/eventlet/twistedsupport.py b/eventlet/support/twisted.py similarity index 97% rename from eventlet/twistedsupport.py rename to eventlet/support/twisted.py index dfd57fb..2776882 100644 --- a/eventlet/twistedsupport.py +++ b/eventlet/support/twisted.py @@ -1,5 +1,5 @@ """\ -@file twistedsupport.py +@file support.twisted.py @author Donovan Preston Copyright (c) 2005-2006, Donovan Preston @@ -124,7 +124,7 @@ class EventletReactor(posixbase.PosixReactorBase): def emulate(): 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() from twisted.internet.main import installReactor installReactor(reactor)