From 3b181f545aacbe6d61dfedb7cf7135aa0987df6a Mon Sep 17 00:00:00 2001 From: Ben Darnell Date: Mon, 20 Feb 2012 00:40:19 -0800 Subject: [PATCH] Revert "Remove optional setuptools import." This reverts commit 50b28c5d7a1ccfc3cc3a5a8fc5cf664880598fc6. Turns out we do need setuptools in at least one situation: distutils chokes if there are broken symlinks anywhere in the source tree, but in testing with a VM there may be "broken" symlinks that point outside the directory shared with the VM. --- setup.py | 6 ++++++ website/sphinx/releases/next.rst | 1 - 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 91e55933..872c737c 100644 --- a/setup.py +++ b/setup.py @@ -16,6 +16,12 @@ import distutils.core import sys +# Importing setuptools adds some features like "setup.py develop", but +# it's optional so swallow the error if it's not there. +try: + import setuptools +except ImportError: + pass kwargs = {} diff --git a/website/sphinx/releases/next.rst b/website/sphinx/releases/next.rst index 365e48b7..080bd9ec 100644 --- a/website/sphinx/releases/next.rst +++ b/website/sphinx/releases/next.rst @@ -4,7 +4,6 @@ What's new in the next version of Tornado In progress ----------- -* ``setup.py`` no longer imports setuptools on Python 2.x. * Colored logging configuration in `tornado.options` is compatible with the upcoming release of Python 3.3. * `tornado.simple_httpclient` is better about closing its sockets