Mercurial > genshi > genshi-test
comparison setup.py @ 902:09cc3627654c experimental-inline
Sync `experimental/inline` branch with [source:trunk@1126].
author | cmlenz |
---|---|
date | Fri, 23 Apr 2010 21:08:26 +0000 |
parents | 1837f39efd6f |
children |
comparison
equal
deleted
inserted
replaced
830:de82830f8816 | 902:09cc3627654c |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # -*- coding: utf-8 -*- | 2 # -*- coding: utf-8 -*- |
3 # | 3 # |
4 # Copyright (C) 2006-2008 Edgewall Software | 4 # Copyright (C) 2006-2010 Edgewall Software |
5 # All rights reserved. | 5 # All rights reserved. |
6 # | 6 # |
7 # This software is licensed as described in the file COPYING, which | 7 # This software is licensed as described in the file COPYING, which |
8 # you should have received as part of this distribution. The terms | 8 # you should have received as part of this distribution. The terms |
9 # are also available at http://genshi.edgewall.org/wiki/License. | 9 # are also available at http://genshi.edgewall.org/wiki/License. |
33 except ImportError: | 33 except ImportError: |
34 build_doc = test_doc = None | 34 build_doc = test_doc = None |
35 | 35 |
36 _speedup_available = False | 36 _speedup_available = False |
37 | 37 |
38 | |
38 class optional_build_ext(build_ext): | 39 class optional_build_ext(build_ext): |
39 # This class allows C extension building to fail. | 40 # This class allows C extension building to fail. |
40 def run(self): | 41 def run(self): |
41 try: | 42 try: |
42 build_ext.run(self) | 43 build_ext.run(self) |
50 _speedup_available = True | 51 _speedup_available = True |
51 except CCompilerError, e: | 52 except CCompilerError, e: |
52 self._unavailable(e) | 53 self._unavailable(e) |
53 | 54 |
54 def _unavailable(self, exc): | 55 def _unavailable(self, exc): |
55 print '*' * 70 | 56 print('*' * 70) |
56 print """WARNING: | 57 print("""WARNING: |
57 An optional C extension could not be compiled, speedups will not be | 58 An optional C extension could not be compiled, speedups will not be |
58 available.""" | 59 available.""") |
59 print '*' * 70 | 60 print('*' * 70) |
60 print exc | 61 print(exc) |
61 | 62 |
62 | 63 |
63 if Feature: | 64 if Feature: |
64 speedups = Feature( | 65 speedups = Feature( |
65 "optionial C speed-enhancements", | 66 "optional C speed-enhancements", |
66 standard = True, | 67 standard = False, |
67 ext_modules = [ | 68 ext_modules = [ |
68 Extension('genshi._speedups', ['genshi/_speedups.c']), | 69 Extension('genshi._speedups', ['genshi/_speedups.c']), |
69 ], | 70 ], |
70 ) | 71 ) |
71 else: | 72 else: |
85 cmdclass['bdist_egg'] = my_bdist_egg | 86 cmdclass['bdist_egg'] = my_bdist_egg |
86 | 87 |
87 | 88 |
88 setup( | 89 setup( |
89 name = 'Genshi', | 90 name = 'Genshi', |
90 version = '0.6', | 91 version = '0.7', |
91 description = 'A toolkit for generation of output for the web', | 92 description = 'A toolkit for generation of output for the web', |
92 long_description = \ | 93 long_description = \ |
93 """Genshi is a Python library that provides an integrated set of | 94 """Genshi is a Python library that provides an integrated set of |
94 components for parsing, generating, and processing HTML, XML or | 95 components for parsing, generating, and processing HTML, XML or |
95 other textual content for output generation on the web. The major | 96 other textual content for output generation on the web. The major |