[Distutils] The problem with Setuptools on Python 3.

Lennart Regebro regebro at gmail.com
Mon Apr 20 22:12:17 CEST 2009


On Mon, Apr 20, 2009 at 21:52, P.J. Eby <pje at telecommunity.com> wrote:
> Making a separate setup script for Python 3, at least for setuptools itself,
> if not having a general convention for that, since other packages may want
> to ship 2+3 stuff in the same package.

The typical setup script will look exactly the same under python 2 and
python 3. There is no need for separate scripts in the general
usecase. If you want to run 2to3 automatically, all you need to do is
set up build_py_2to3 instead of build_2to3, that's the only
difference, and that's easily fixed with a importexception.

This goes pretty much for setuptools also. The setup3.py script will
more or less work under python2 as well.

> Or, in the alternative, using version testing in setup.py to run an
> alternate script for Python 3.

You don't need alternative scripts.

setuptools is an exception, because it depends on itself, providing a
catch22 situation.

> I'm sorry you feel that way, as I've been *trying* to help.  I just still
> don't get what the problem is.  If I were porting setuptools to Python 3, I
> would *want* it to be circular, even if I had to hack on it a little at
> first.  So I have a hard time understanding why you don't.

But it CAN NOT be circular under Python 3.

>  Maybe if I were trying to port it, I would get what problem you're having,
> or maybe I would just keep right on going and not notice.  I don't know.

You will have it and I explained in the mail I sent as a start of this
discussion. If I was unclear, please tell me what you didn't
understand.

>  I've been trying to find out what exactly is stopping you and just can't
> seem to wrap my brain around it, any more than you've been able to about the
> reverse.

> Mostly because your questions aren't pinpointing what you want to know.

It is pinpointing them exactly. I want to know why setuptools need to
depends on setuptools. Your answer, as I can understand it is for
convenience, and so that it serves as a test and example of it's own
features.

The fact that is serves as a test of it's own features is another
pain. That was a big reason for the difficulty of porting, as even
when testcases all passed, not all features worked. So I have to say
that although it sounds reasonable, I think it's misguided.

>> Eggs are not easier to install, on the contrary, I have tried and
>> failed a couple of times, and ended up using the source install
>> instead.
>
> ...seems to indicate that your question was actually about eggs, not
> other-than-source distributions in general.

Which probably is why I said eggs...

>  The eggs are there, on the other hand,
> for ez_setup.py to download. (Not to mention buildout's bootstrap script,
> and other tools that depend on setuptools and want to have an automated
> overall install process.)

OK, I wonder if there is a way around that. If not, then as far as I
can see, there is no way to install or develop with setuptools
smoothly in Python 3.

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64


More information about the Distutils-SIG mailing list