+debugsupport = Feature(
+ 'optional C debug support',
+ standard=False,
+ ext_modules = [
+ Extension('jinja2._debugsupport', ['jinja2/_debugsupport.c']),
+ ],
+)
+
+
+# tell distribute to use 2to3 with our own fixers.
+extra = {}
+if sys.version_info >= (3, 0):
+ extra.update(
+ use_2to3=True,
+ use_2to3_fixers=['custom_fixers']
+ )
+
+# ignore the old '--with-speedups' flag
+try:
+ speedups_pos = sys.argv.index('--with-speedups')
+except ValueError:
+ pass
+else:
+ sys.argv[speedups_pos] = '--with-debugsupport'
+ sys.stderr.write('*' * 74 + '\n')
+ sys.stderr.write('WARNING:\n')
+ sys.stderr.write(' the --with-speedups flag is deprecated, assuming '
+ '--with-debugsupport\n')
+ sys.stderr.write(' For the actual speedups install the MarkupSafe '
+ 'package.\n')
+ sys.stderr.write('*' * 74 + '\n')