> I poked around a bit and didn't see an obvious way to do this.  Can
> anybody suggest the best way to go about implementing it?

distutils has the distutils.util.run_2to3 function, which makes
it fairly straight-forward to invoke 2to3 on a set of files.
On top of these, you have copydir_run_2to3, and Mixin2to3
(which allows writing commands that have 2to3 as a step).

I recommend to copy the test suite into the build directory
(next to the real build output), and run 2to3 on that copy
(e.g. using the copydir version, which will check modification
times). Changing the files in-place is typically inappropriate,
as that would mess with your version control.

See

http://bitbucket.org/loewis/django-3k/src/tip/setup.py

for an example, in particular build_tests.

HTH,
Martin
_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to