[Numpy-discussion] FYI: experimental waf support for numpy

David david@silveregg.co...
Wed Feb 9 23:30:37 CST 2011


Hi there,

Following recent release of waf 1.6 and its adoption by the samba 
project, as well as my own work on integrating waf and bento, I have 
spent some time to build numpy with it. Although this is experimental, 
it should be possible for people to play with it:

https://github.com/cournape/numpy/tree/waf_build

You need a recent waf checkout (trunk), and you build numpy as follows:

$waf_checkout/waf-light configure
$waf_checkout/waf-light build

Waf is python build system, a bit like scons, but smaller, cleaner, much 
faster and somehow easier to integrate as a library

The added code in numpy is ~ 1200 lines of code, of which almost half is 
just to get missing configuration from waf, IOW, the whole numpy build 
is described in ~ 600 lines of code, and works on linux, mac os x and 
windows (Visual Studio only for now).

Besides the maintenance advantage, the waf build has a few interesting 
features:
   - < 1 sec no-op build with dependencies tracking (header changes, 
file content change, etc...)
   - ~ 10 sec debug build on a 2 years old machine
   - very easy to customize with alternative blas/lapack libraries, or 
use alternative compilers like clang.
   - nice output and full log written when a configuration error has 
occured, for easier build debugging.

Note that this cannot be used to install numpy, and is of interest only 
for developers ATM - the goal is to integrate this with bento to get a 
robust build and deployment framework for numpy, scipy and beyond.

cheers,

David


More information about the NumPy-Discussion mailing list