From: W. Trevor King Date: Tue, 11 Dec 2012 16:18:29 +0000 (-0500) Subject: Add 2to3.py script to run both the default and our custom fixes locally X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0cf4c740addabfef67b8f238d6acd0be3b1c7533;p=jinja2.git Add 2to3.py script to run both the default and our custom fixes locally 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. --- diff --git a/2to3.py b/2to3.py new file mode 100755 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')