From: Ben Darnell Date: Sat, 7 Jun 2014 15:08:52 +0000 (-0400) Subject: Broaden catch clause in extension building. X-Git-Tag: v4.0.0b1~24 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9fa52d7855eee0fc1a99fdef51581e91978af145;p=thirdparty%2Ftornado.git Broaden catch clause in extension building. This should allow Tornado to be installed again on OSX with no compiler available. Closes #1074. --- diff --git a/setup.py b/setup.py index f888fdcee..0a35d612b 100644 --- a/setup.py +++ b/setup.py @@ -83,7 +83,7 @@ http://api.mongodb.org/python/current/installation.html#osx def run(self): try: build_ext.run(self) - except DistutilsPlatformError: + except build_errors: e = sys.exc_info()[1] sys.stdout.write('%s\n' % str(e)) warnings.warn(self.warning_message % ("Extension modules", @@ -93,24 +93,17 @@ http://api.mongodb.org/python/current/installation.html#osx def build_extension(self, ext): name = ext.name - if sys.version_info[:3] >= (2, 4, 0): - try: - build_ext.build_extension(self, ext) - except build_errors: - e = sys.exc_info()[1] - sys.stdout.write('%s\n' % str(e)) - warnings.warn(self.warning_message % ("The %s extension " - "module" % (name,), - "The output above " - "this warning shows how " - "the compilation " - "failed.")) - else: + try: + build_ext.build_extension(self, ext) + except build_errors: + e = sys.exc_info()[1] + sys.stdout.write('%s\n' % str(e)) warnings.warn(self.warning_message % ("The %s extension " "module" % (name,), - "Please use Python >= 2.4 " - "to take advantage of the " - "extension.")) + "The output above " + "this warning shows how " + "the compilation " + "failed.")) kwargs = {}