From: Michael W. Hudson Date: Tue, 24 Dec 2002 14:45:54 +0000 (+0000) Subject: *cough* repair utterly broken stuff from my last check-in (to do with X-Git-Tag: v2.2.3c1~198 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ca785acd1d8934e345e152442edc11c8f541fc0a;p=thirdparty%2FPython%2Fcpython.git *cough* repair utterly broken stuff from my last check-in (to do with renaming rather than deleting modules that don't import). --- diff --git a/setup.py b/setup.py index 25b30e4f8e8e..be0988117c24 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ __version__ = "$Revision$" -import sys, os, getopt +import sys, os, getopt, imp from distutils import sysconfig from distutils import text_file from distutils.errors import * @@ -161,9 +161,12 @@ class PyBuildExt(build_ext): 'WARNING: skipping import check for Carbon-based "%s"' % ext.name) return + ext_filename = os.path.join( + self.build_lib, + self.get_ext_filename(self.get_ext_fullname(ext.name))) try: - __import__(ext.name) - except ImportError: + imp.load_dynamic(ext.name, ext_filename) + except ImportError, why: if 1: self.announce('*** WARNING: renaming "%s" since importing it' ' failed: %s' % (ext.name, why))