[Numpy-discussion] Setuptools leftover junk

David M. Cooke cookedm at physics.mcmaster.ca
Fri Jun 30 14:19:26 CDT 2006

On Wed, 28 Jun 2006 13:46:07 -0600
"Fernando Perez" <fperez.net at gmail.com> wrote:

> On 6/28/06, David M. Cooke <cookedm at physics.mcmaster.ca> wrote:
> > [Really, distutils sucks. I think (besides refactoring) it needs it's API
> > documented better, or least good conventions on where to hook into.
> > setuptools and numpy.distutils do their best, but there's only so much you
> > can do before everything goes fragile and breaks in unexpected ways.]
> I do hate distutils, having fought it for a long time.  Its piss-poor
> dependency checking is one of its /many/ annoyances.  For a package
> with as long a compile time as scipy, it really sucks not to be able
> to just modify random source files and trust that it will really
> recompile what's needed (no more, no less).
> Anyway, thanks for heeding this one.  Hopefully one day somebody will
> do the (painful) work of replacing distutils with something that
> actually works (perhaps using scons for the build engine...)  Until
> then, we'll trod along with massively unnecessary rebuilds :)

I've tried using SCons -- still don't like it. It's python, but it's too
unpythonic for me. (The build engine itself is probably fine, though.)

A complete replacement for distutils isn't needed: bits and pieces can be
replaced at a time (it gets harder if you've got two packages like setuptools
and numpy.distutils trying to improve it, though). For instance, the
CCompiler class could be replaced in whole with a rewrite, keeping what could
be considered the public API. I've done this before with a version of
UnixCCompiler that let me specify a "toolchain": which C compiler and C++
compiler worked together, which linker to use for them, and associated flags.

I'm working (slowly) on a rewrite of commands/build_ext.py in numpy.distutils
that should keep track of source dependencies better, for instance.

|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca

More information about the Numpy-discussion mailing list