Changeset 789
- Timestamp:
- 01/10/08 01:56:05 (18 months ago)
- Files:
-
- 1 modified
-
trunk/setup.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/setup.py
r715 r789 15 15 from distutils.cmd import Command 16 16 from distutils.command.build_ext import build_ext 17 from distutils.errors import CCompilerError 17 from distutils.errors import CCompilerError, DistutilsPlatformError 18 18 import doctest 19 19 from glob import glob … … 35 35 class optional_build_ext(build_ext): 36 36 # This class allows C extension building to fail. 37 def run(self): 38 try: 39 build_ext.run(self) 40 except DistutilsPlatformError: 41 self._unavailable() 42 37 43 def build_extension(self, ext): 38 44 try: 39 45 build_ext.build_extension(self, ext) 40 46 except CCompilerError, x: 41 print '*' * 70 42 print """WARNING: 47 self._unavailable() 48 49 def _unavailable(self): 50 print '*' * 70 51 print """WARNING: 43 52 An optional C extension could not be compiled, speedups will not be 44 53 available.""" 45 print '*' * 7054 print '*' * 70 46 55 47 56
