[Distutils] People want CPAN :-)

Robert Kern robert.kern at gmail.com
Wed Nov 11 22:36:20 CET 2009


On 2009-11-11 15:02 PM, Greg Ewing wrote:
> Tarek Ziadé wrote:
>
>> If the answer to that solution is just: "Distutils sucks anyways..",
>> it is not really helpfull imho..
>>
>> I don't see the point to write Distutils from scratch, instead of
>> making it evolve.
>
> If you can see a way to get from the current distutils
> code to something with a well-designed and well-documented
> API and a clean implementation, that would be fine by
> me.
>
> When I say it's fundamentally broken, I'm really talking
> about the API. My idea of what an API for a build system
> should be like is more like make or scons, which slice
> the functionality up in a completely orthogonal direction
> to the way distutils does.
>
> Maybe it would be possible to plug such a system in under
> the existing build_ext class. I don't know.

In fact, David has.

http://pypi.python.org/pypi/numscons/

 > I think I
 > would like the same philosophy applied to other areas
 > of distutils, not just compiling extensions. Otherwise
 > it would feel like two incompatible systems bolted
 > together.

It does feel something like that. The build system is just one of the problems 
with distutils' internals, in my experience. You can think of the rest of 
distutils as a little application framework for command line utilities. I think 
this framework simply fails to provide in very fundamental ways, like the 
"extend commands by subclassing" design pattern. That choice makes it 
fundamentally difficult to combine extensions together. I really don't see a way 
to evolve away from that (and believe me, over the last decade, I've tried). You 
just need to redesign the internals if you want to get away from that. You can't 
get from any point A to any point B by evolving in small steps that are 
functional (not to mention backwards compatible!) all the way through.

With all respect to Greg Ward and the rest of the original distutils authors, it 
was a fantastic improvement over the state of affairs ten years ago, but we've 
learned a lot about application frameworks and about building software since then.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco



More information about the Distutils-SIG mailing list