Changeset 501 for cly/trunk/setup.py
- Timestamp:
- 01/04/08 09:02:04 (1 year ago)
- Files:
-
- cly/trunk/setup.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cly/trunk/setup.py
r493 r501 5 5 import sys 6 6 from distutils.command.build_ext import build_ext 7 from distutils.errors import CCompilerError7 from distutils.errors import DistutilsPlatformError, CCompilerError 8 8 9 9 class optional_build_ext(build_ext): 10 10 # This class allows C extension building to fail. 11 def run(self): 12 try: 13 build_ext.run(self) 14 except DistutilsPlatformError: 15 self._unavailable() 16 11 17 def build_extension(self, ext): 12 18 try: 13 19 build_ext.build_extension(self, ext) 14 20 except CCompilerError, x: 15 print '*' * 78 16 print """ 21 self._unavailable() 22 23 def _unavailable(self): 24 print '*' * 78 25 print """ 17 26 WARNING: Could not compile C extension, contextual help will not be available. 18 27 """ 19 print '*' * 7828 print '*' * 78 20 29 21 30
