- def _unavailable(self):
- print '*' * 70
- print """WARNING:
-An optional C extension could not be compiled, speedups will not be
-available."""
- print '*' * 70
+# 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')