[Numpy-discussion] preferred numpy build system

David Cournapeau david at ar.media.kyoto-u.ac.jp
Sun Feb 8 22:56:41 EST 2009


Ondrej Certik wrote:
>> That's exactly what I don't like about cmake  - it means you can't
>> produce accurate builds (you need to rerun cmake everytime you change
>> the configuration or dependencies, whereas this is automatic with
>> scons/waf). It also have (used to have) very poor documentation unless
>> you buy the book - but it looks like this is changing.
>>     
>
> You can always rerun cmake if you want (and make it automatic). Imho
> that's not a problem. But maybe it is done in a better way with scons.
>   

I think it is a problem - it means you have to update it explicitly when
the configuration changes. In scons, the signature concept is quite
powerful: not only are file dependencies handled, but also command
lines, etc... For example, in numscons, if you change the blas/lapack
from atlas to say MKL, only linking and eventually configuration changes
are rebuilt. If you change the fortran compiler but not the C compiler,
only fortran code is rebuilt. All of this is 100 % automatic.

When testing software on many toolchains/platforms, this is very
valuable - it is one of the main reason why Intel, Vmware use it, at
least from the information I understood from the Mailing list. In terms
of accuracy, scons is way beyond anything cmake has to offer.

In the case of numpy, I think cmake would be difficult to integrate into
distutils

> Yes, waf is pretty cool, even though the last time I looked at it, it
> wasn't able to compile my project, which was larger than just couple
> files.
>   

I doubt this has anything to do with the project size. Waf seems more
scalable than scons, and scons can handle big projects (almost all
vmware projects are built using scons, for example), albeit slowly.

> As to the other things, one nice thing about cmake is that it is
> production ready right now, it is well tested (kde4) and it is in
> distributions (e.g. Debian).

For portability reasons, I think the build system should always
distributed with the project you are building (like autoconf does,
actually); this is another drawback of cmake. Waf's main author is
against any waf packaging - waf can be distributed as one < 100 kb
python file, which is very nice.

I don't want to sound overly critical against cmake: obviously, since it
is used by KDE4, it is definitely a good software. It supports some
features which I wish scons had (rpath and install-relinking,
distribution related features).

David



More information about the NumPy-Discussion mailing list