Add 2to3.py script to run both the default and our custom fixes locally
authorW. Trevor King <wking@tremily.us>
Tue, 11 Dec 2012 16:18:29 +0000 (11:18 -0500)
committerW. Trevor King <wking@tremily.us>
Tue, 11 Dec 2012 16:18:43 +0000 (11:18 -0500)
If you're using the local directory directly, rather than building and
installing Jinja2 via setup.py, you need to make the 2to3 updates
locally, using both the default fixers and our custom fixers.
Unfortunately, the stock 2to3 tool lacks an option for appending
custom fixer modules.  This script is the simplest tweak that will
apply both sets of fixers.

2to3.py [new file with mode: 0755]

diff --git a/2to3.py b/2to3.py
new file mode 100755 (executable)
index 0000000..afd4d52
--- /dev/null
+++ b/2to3.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python3.3
+import sys
+from lib2to3.main import main
+
+def run(fixer_pkg):
+    ret = main(fixer_pkg)
+    if ret:
+        sys.exit(ret)
+
+run('lib2to3.fixes')
+run('custom_fixers')