[Numpy-discussion] FYI: experimental waf support for numpy
david at silveregg.co.jp
Thu Feb 10 00:30:37 EST 2011
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:
You need a recent waf checkout (trunk), and you build numpy as follows:
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
- < 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.
More information about the NumPy-Discussion