[Python-Dev] Raising objections

A.M. Kuchling amk at amk.ca
Wed Apr 19 22:15:08 CEST 2006


On Wed, Apr 19, 2006 at 03:02:15PM -0400, Phillip J. Eby wrote:
> I can tell you the reasons, no need to guess:

5. The Distutils has lots of customization hooks, but if the exact
hook you need isn't there, you're in deep trouble.  I learned this 
when trying to implement a package database.

> I agree with you, which is why setuptools fixes distutils' flaws by 
> subclassing where possible and monkeypatching only where necessary to 
> ensure compatibility.  (Only three classes are monkeypatched: Distribution, 
> Command, and Extension.)

At least some of these changes to Distutils seem unobjectionable for
inclusion.

For example, the changes to Command just allow keyword arguments on
two methods and adds a class attribute; they seem unlikely to break
any existing users of the class.

The Extension change replaces .pyx source files with .c; I'm not sure
what the purpose of this change is, but it clearly might cause
problems for distributions with Pyrex source files.

The Distribution changes add some more optional kw arguments -- no
problem there -- and a bunch of egg-specific methods.  This set would
need some further study, and also bakes in .egg support; we'd have to
be very sure that .eggs are the way to go, so this might need a PEP
and/or BDFL pronouncement.

Obviously, applying changes to Distutils makes Phillip's maintenance
of setuptools more difficult -- now he has to worry about
monkeypatching or not depending on the Python version.  But at least
some of the monkeypatching can be removed -- maybe all of it if the
Distribution class proves amenable.

--amk


More information about the Python-Dev mailing list