Commit e7ed75ca authored by Tarek Ziadé's avatar Tarek Ziadé

Merged revisions 70920,70922 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70920 | tarek.ziade | 2009-03-31 17:44:10 -0500 (Tue, 31 Mar 2009) | 1 line

  catching msvc9compiler error as well
........
  r70922 | tarek.ziade | 2009-03-31 17:47:01 -0500 (Tue, 31 Mar 2009) | 1 line

  fixed the test for win32 CompileError
........
parent 0aee51d1
...@@ -457,7 +457,7 @@ class build_ext(Command): ...@@ -457,7 +457,7 @@ class build_ext(Command):
for ext in self.extensions: for ext in self.extensions:
try: try:
self.build_extension(ext) self.build_extension(ext)
except (CCompilerError, DistutilsError) as e: except (CCompilerError, DistutilsError, CompileError) as e:
if not ext.optional: if not ext.optional:
raise raise
self.warn('building extension "%s" failed: %s' % self.warn('building extension "%s" failed: %s' %
......
...@@ -11,6 +11,7 @@ from distutils.tests.support import TempdirManager ...@@ -11,6 +11,7 @@ from distutils.tests.support import TempdirManager
from distutils.tests.support import LoggingSilencer from distutils.tests.support import LoggingSilencer
from distutils.extension import Extension from distutils.extension import Extension
from distutils.errors import UnknownFileError from distutils.errors import UnknownFileError
from distutils.errors import CompileError
import unittest import unittest
from test import support from test import support
...@@ -154,7 +155,8 @@ class BuildExtTestCase(TempdirManager, ...@@ -154,7 +155,8 @@ class BuildExtTestCase(TempdirManager,
dist = Distribution({'name': 'xx', 'ext_modules': modules}) dist = Distribution({'name': 'xx', 'ext_modules': modules})
cmd = build_ext(dist) cmd = build_ext(dist)
cmd.ensure_finalized() cmd.ensure_finalized()
self.assertRaises(UnknownFileError, cmd.run) # should raise an error self.assertRaises((UnknownFileError, CompileError),
cmd.run) # should raise an error
modules = [Extension('foo', ['xxx'], optional=True)] modules = [Extension('foo', ['xxx'], optional=True)]
dist = Distribution({'name': 'xx', 'ext_modules': modules}) dist = Distribution({'name': 'xx', 'ext_modules': modules})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment