comparison setup.py @ 796:3a2063b008c8 stable-0.5.x

Ported [995] to 0.5.x branch.
author cmlenz
date Thu, 15 Jan 2009 23:46:08 +0000
parents 786da267139e
children
comparison
equal deleted inserted replaced
789:786da267139e 796:3a2063b008c8
38 class optional_build_ext(build_ext): 38 class optional_build_ext(build_ext):
39 # This class allows C extension building to fail. 39 # This class allows C extension building to fail.
40 def run(self): 40 def run(self):
41 try: 41 try:
42 build_ext.run(self) 42 build_ext.run(self)
43 except DistutilsPlatformError: 43 except DistutilsPlatformError, e:
44 self._unavailable() 44 self._unavailable(e)
45 45
46 def build_extension(self, ext): 46 def build_extension(self, ext):
47 try: 47 try:
48 build_ext.build_extension(self, ext) 48 build_ext.build_extension(self, ext)
49 global _speedup_available 49 global _speedup_available
50 _speedup_available = True 50 _speedup_available = True
51 except CCompilerError, x: 51 except CCompilerError, e:
52 self._unavailable() 52 self._unavailable(e)
53 53
54 def _unavailable(self): 54 def _unavailable(self, exc):
55 print '*' * 70 55 print '*' * 70
56 print """WARNING: 56 print """WARNING:
57 An optional C extension could not be compiled, speedups will not be 57 An optional C extension could not be compiled, speedups will not be
58 available.""" 58 available."""
59 print '*' * 70 59 print '*' * 70
60 print exc
60 61
61 62
62 if Feature: 63 if Feature:
63 speedups = Feature( 64 speedups = Feature(
64 "optionial C speed-enhancements", 65 "optionial C speed-enhancements",
80 81
81 cmdclass = {'build_doc': build_doc, 'test_doc': test_doc, 82 cmdclass = {'build_doc': build_doc, 'test_doc': test_doc,
82 'build_ext': optional_build_ext} 83 'build_ext': optional_build_ext}
83 if bdist_egg: 84 if bdist_egg:
84 cmdclass['bdist_egg'] = my_bdist_egg 85 cmdclass['bdist_egg'] = my_bdist_egg
86
85 87
86 setup( 88 setup(
87 name = 'Genshi', 89 name = 'Genshi',
88 version = '0.5.2', 90 version = '0.5.2',
89 description = 'A toolkit for generation of output for the web', 91 description = 'A toolkit for generation of output for the web',
Copyright (C) 2012-2017 Edgewall Software