[Python-Dev] setuptools in the stdlib

Phillip J. Eby pje at telecommunity.com
Wed Apr 19 02:53:53 CEST 2006


At 02:12 AM 4/19/2006 +0200, Giovanni Bajo wrote:
>But, why can't setuptools be gradually merged into distutils, instead of being
>kept as a separate package? Let's take a real example: setuptools' sdist is
>much enhanced, has integration with CVS/SVN, uses MANIFEST in a way that it
>really works, etc. Why can't it be merged into the original distutils? Is it
>just for backward compatibility?

This specific issue was discussed last year on the distutils-sig, and the 
issue is indeed one of compatibility.  Setuptools' behavior for MANIFEST 
generation definitely matches new or infrequent users' expectations 1000% 
better than the distutils, and requires much less work to get right, even 
for experts.

But for anybody who has extended the distutils using external tools, it 
would not necessarily work.  MAL gave the example of someone who has 
written other scripts or Makefile rules to add things to MANIFEST or use it 
to do other things.  They might be relying on quirks of the existing 
behaviors, in other words, and thus it should not be changed without 
explicit action on their part.

And I agree with his reasoning, although I also think that any "distutils 
2" should have only One Obvious Way to send input to that process, and it 
should be via MANIFEST.in, not MANIFEST.  Likewise, it should have only one 
way to get the output.

However, unless somebody explicitly chooses to use "distutils 2", they 
should get the old behavior.  This unfortunately means that we can't 
backport most of setuptools' enhancements to the existing distutils without 
breaking backward compatibility for people who may have made extensive 
investment in integrating with the distutils.

(Of course, how many of these people exist I don't know; in my personal 
experience it seems rare for people to integrate with external tools in 
this fashion, versus simply subclassing things in Python or abandoning 
distutils altogether.  But that's a separate question.)


>If so, can't we have some kind of versioning
>system?

We do: "import setuptools".  We could perhaps rename it to "import 
distutils2" if you prefer, but it would mean essentially the same thing.  :)



More information about the Python-Dev mailing list