Distribute: Running 2to3 on just some files/directories
Hi, I've got a Distribute question: We bundle a library in our application. The library is already py3k compatible but we need to use 2to3 for our code. Is there a way to tell Distribute to skip a directory? Or, alternatively, to feed it a list of to run 2to3 on directly. I looked at the relevant code (in build_py) but I can't seem to get it. How does Distribute know which files have changed? Perhaps we could "trick" it into thinking that directory hasn't changed so that it wouldn't run 2to3 on it. If this is not possible at all, I'd be willing to code it for Distribute (provided someone gives me some pointers). Thanks! -- Vladimir Perić
Hi, I've got a Distribute question: We bundle a library in our application. The library is already py3k compatible but we need to use 2to3 for our code. Is there a way to tell Distribute to skip a directory? Or, alternatively, to feed it a list of to run 2to3 on directly. I looked at the relevant code (in build_py) but I can't seem to get it. How does Distribute know which files have changed? Perhaps we could "trick" it into thinking that directory hasn't changed so that it wouldn't run 2to3 on it. If this is not possible at all, I'd be willing to code it for Distribute (provided someone gives me some pointers). Thanks! [I might've sent this twice, I'm not sure. Sorry if that's the case!] -- Vladimir Perić
On Sat, Jun 25, 2011 at 01:37, Vladimir Perić <vlada.peric@gmail.com> wrote:
I've got a Distribute question: We bundle a library in our application. The library is already py3k compatible but we need to use 2to3 for our code. Is there a way to tell Distribute to skip a directory?
No, but you can extract the library into it's own package and set up your package to require it, at which point it will be downloaded and installed when you install your package. That's the correct way of doing it.
Or, alternatively, to feed it a list of to run 2to3 on directly. I looked at the relevant code (in build_py) but I can't seem to get it. How does Distribute know which files have changed?
Timestamps compared with the target. -- Lennart Regebro: http://regebro.wordpress.com/ Porting to Python 3: http://python3porting.com/
participants (2)
-
Lennart Regebro
-
Vladimir Perić