From 0cf4c740addabfef67b8f238d6acd0be3b1c7533 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Tue, 11 Dec 2012 11:18:29 -0500 Subject: [PATCH] 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. --- 2to3.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 2to3.py 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') -- 2.26.2