[Distutils] Problem with distribute and converting tests for python3
regebro at gmail.com
Mon Oct 12 20:37:52 CEST 2009
2009/10/12 Michael Whapples <mwhapples at aim.com>:
> leads to some more general questions about python and distributing modules
> (eg. why do we need binary distributions (bdist_egg, bdist, etc) when a
> source distribution should be fine and do all needed
You don't. As mentioned, binary distributions are generally not
needed, unless you have C-extensions that need compiling, and then
usually only on Windows, as Windows doesn't include a compiler.
> why does python
> distribute source and compiled files in a binary distribution (what does the
> source files add in such a case), etc).
Well, why not? Excluding them serves no purpose. And including them
means you can read the source, debug, etc.
> Anyway back to the actual topic. My main question of the possible solution
> is, why can't we have a way of specifying extra directories to run 2to3 on?
It's a pretty special case. I agree that for the test/test*.py case we
should find some sort of solution for backwards compatibility reason,
but otherwise I'm afraid I don't really see the point. There is
already support for including several source directories, it seems to
me that this is just that, another source directory, in this case with
tests. I haven't tried that with 2to3, but if that doesn't work,
that's definitely a bug.
In your case, if you absolutely want to have your code like this, I'd
guess subclassing the test command to run 2to3 on the tests first
would be the best way.
> Tests are an example (well at least the way I view tests) of when this could
> be useful, it may be useful in other cases (not thought of an example).
Lennart Regebro: Python, Zope, Plone, Grok
+33 661 58 14 64
More information about the Distutils-SIG