diff --git a/setup.py b/setup.py index 353788b8..3e1ccdc3 100644 --- a/setup.py +++ b/setup.py @@ -23,6 +23,8 @@ try: except ImportError: pass +kwargs = {} + # Build the epoll extension for Linux systems with Python < 2.6 extensions = [] major, minor = sys.version_info[:2] @@ -33,6 +35,10 @@ if "linux" in sys.platform.lower() and not python_26: version = "1.2.1" +if major >= 3: + import setuptools # setuptools is required for use_2to3 + kwargs["use_2to3"] = True + distutils.core.setup( name="tornado", version=version, @@ -48,4 +54,5 @@ distutils.core.setup( download_url="http://github.com/downloads/facebook/tornado/tornado-%s.tar.gz" % version, license="http://www.apache.org/licenses/LICENSE-2.0", description="Tornado is an open source version of the scalable, non-blocking web server and and tools that power FriendFeed", + **kwargs )