diff options
author | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-03-31 22:37:55 (GMT) |
---|---|---|
committer | Tarek Ziadé <ziade.tarek@gmail.com> | 2009-03-31 22:37:55 (GMT) |
commit | b2e36f1df7cbc06134464bfcc1e48936e80e91fa (patch) | |
tree | b378116a4b453fd0044baabf0b14f39b8dab2f19 /Lib/distutils/command | |
parent | a931404804bd2243ae549af5e102860a68eb5fca (diff) | |
download | cpython-b2e36f1df7cbc06134464bfcc1e48936e80e91fa.zip cpython-b2e36f1df7cbc06134464bfcc1e48936e80e91fa.tar.gz cpython-b2e36f1df7cbc06134464bfcc1e48936e80e91fa.tar.bz2 |
Merged revisions 70910 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r70910 | tarek.ziade | 2009-03-31 17:27:23 -0500 (Tue, 31 Mar 2009) | 1 line
#5583 Added optional Extensions in Distutils
........
Diffstat (limited to 'Lib/distutils/command')
-rw-r--r-- | Lib/distutils/command/build_ext.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index 1ed69f3..2295906 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -455,7 +455,13 @@ class build_ext(Command): self.check_extensions_list(self.extensions) for ext in self.extensions: - self.build_extension(ext) + try: + self.build_extension(ext) + except (CCompilerError, DistutilsError) as e: + if not ext.optional: + raise + self.warn('building extension "%s" failed: %s' % + (ext.name, e)) def build_extension(self, ext): sources = ext.sources |