[Distutils] The problem with Setuptools on Python 3.

P.J. Eby pje at telecommunity.com
Mon Apr 20 21:01:09 CEST 2009


At 07:13 PM 4/20/2009 +0200, Lennart Regebro wrote:
>Which still doesn't really answer the question: Why setuptools need to
>rely on setuptools.

Because there's less duplication and chances of error that 
way.  (Earlier versions of setuptools relied on manually-created text 
files, instead of using egg_info to generate them, and 
creating/maintaining the files was a pain.)


> > Because distutils doesn't have an egg_info command
>
>I've already mentioned that getting rid of the setuptools dependency
>on itself means you can't build setuptools eggs. But I've also pointed
>out that I don't understand why they would be needed.

Because the egg-info files (irrespective of whether you build an 
sdist, an .egg, an .exe, or even install a "flat" package) contain 
information like entry points and requirements.

In the case of setuptools itself, the entry points are critical 
because setuptools finds its own commands, options, etc., almost 
exclusively by using entry points.  This is so that it's on a level 
playing field with other packages wanting to extend those features, 
and serves as an example of how to extend itself.

Look, if you want to fork setuptools to not depend on itself, knock 
yourself out.  I sure can't stop you.

It's simply that, from my POV, I'd rather not complicate the main 
branches with duplication to support Python 3, when ISTM that the 
Python-3-support bits could be isolated instead.  Also, I think that 
setuptools self-bootstrapping is both a non-trivial integration test 
that shouldn't be dropped, AND a non-trivial example of how to extend 
setuptools (since so much of it is implemented using independent 
entry points rather than hardwired behavior).

All that having been said, I'm not the one doing the port, so do what 
you think best.


>  For all other
>packages it's recommended that only source distributions are done
>unless you have c-extensions.

Recommended by whom, for what purpose?


>Why is setuptools an exception?

For end-user convenience.  A large number of people installing 
setuptools are not installing it because they are personally 
interested in it, but because something else they want uses it.



More information about the Distutils-SIG mailing list