[Distutils] People want CPAN :-)

Ian Bicking ianb at colorstudy.com
Mon Nov 9 08:50:25 CET 2009

On Mon, Nov 9, 2009 at 1:09 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
> David Lyon <david.lyon at preisshare.net> writes:
>> On Sun, 8 Nov 2009 23:28:42 -0600, Ian Bicking <ianb at colorstudy.com> wrote:
>> > In the tools I've written, I generally give the traceback if the
>> > verbosity is turned up, and in a case like this (an unexpected
>> > exception -- for distutils that's any exception except a few that
>> > distutils defines) I include "use -v for more".
>> >
>> > I think distutils (or Distribute) could do the same.
>> Hi Ian,
>> I think PIP is quite an accomplishment.
>> But don't you think that its a big ask to refactor
>> distutils/distribute to redo their error messages for package
>> building?
> I've just had a read through the code for ‘pip’; AFAICT, the “redo the
> error messages for package building” essentially amounts to using the
> ‘logging’ module. Is that a big ask?

pip doesn't use the logging module, it uses its own logger, which is
intended more for managing the output of a command-line program and
not just post-mortem debugging.

I don't think changing distutils to improve error output would be hard
at all.  It looks like there's a line in distutils.core that catches
these exceptions (and doesn't look like it actually catches all
exceptions?), and that can just be fixed.

Another topic that has come up: I do agree subclassing makes it really
hard to have multiple lines of development (specifically something
like Setuptools or Distribute, along with ad hoc development in
setup.py files).  But I think that can be resolved.  Perhaps, for
instance, Distribute can have implementations of commands like build,
that can easily be customized or extended without subclassing (e.g.,
by pre-build or post-build functions).  I'd really be shocked if a
rewrite of distutils was necessary, or even necessary to simplify

Ian Bicking  |  http://blog.ianbicking.org  |  http://topplabs.org/civichacker

More information about the Distutils-SIG mailing list