Mercurial > genshi > genshi-test
changeset 673:3a949bcaaf3d
Ignore missing compiler errors on Windows. Fixes #174 and #165.
author | athomas |
---|---|
date | Thu, 10 Jan 2008 00:56:05 +0000 |
parents | e69d95e80231 |
children | 0018a6bede9b ae5378f81398 |
files | setup.py |
diffstat | 1 files changed, 13 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py +++ b/setup.py @@ -14,7 +14,7 @@ from distutils.cmd import Command from distutils.command.build_ext import build_ext -from distutils.errors import CCompilerError +from distutils.errors import CCompilerError, DistutilsPlatformError import doctest from glob import glob import os @@ -34,15 +34,24 @@ class optional_build_ext(build_ext): # This class allows C extension building to fail. + def run(self): + try: + build_ext.run(self) + except DistutilsPlatformError: + self._unavailable() + def build_extension(self, ext): try: build_ext.build_extension(self, ext) except CCompilerError, x: - print '*' * 70 - print """WARNING: + self._unavailable() + + def _unavailable(self): + print '*' * 70 + print """WARNING: An optional C extension could not be compiled, speedups will not be available.""" - print '*' * 70 + print '*' * 70 if Feature: