use_2to3 ordering issue

Issue #162 new
Ronald Oussoren
created an issue

The use_2to3 support code in distribute seems to first copy all files (modified) and then run 2to3 on the copy. That works fine when 2to3 runs to completion, but when 2to3 is aborted for some reason it won't try again.

To reproduce: Create a project with a some large files Run 'python3 build_py' to make distribute run the 2to3 tool Abort this run, using 'Ctrl+C' on a unixy system Run 'python3 build_py' again

It would be nice if the second run of build_py would run the 2to3 tool on files that weren't translated in the first run, currently 2to3 won't be run unless you change the source files.

I ran into this while working on the py3k port of one of my projects, I had some code that caused problems in the 2to3 tool (due to issues with my code) and after fixing that I noticed that distribute had translated only part of my project.

Workaround: remove the build tree and try again.

Comments (2)

  1. Lennart Regebro

    There is no real good way for Distribute to know which files it has run 2to3 on, so this is hard to solve. You also need to remove the build directory at many other instances, like when you change the so that more files should get converted. I think this even is mentioned in the documentation.

  2. Log in to comment