FYI: experimental waf support for numpy
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
David, On Thu, 10 Feb 2011 14:30:37 +0900, David <david@silveregg.co.jp> wrote:
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:
great news !
You need a recent waf checkout (trunk), and you build numpy as follows:
$waf_checkout/waf-light configure $waf_checkout/waf-light build
why don't you just put the waf executable within the numpy repository ? (well, I had sometimes some problem with that modus operandi: my archlinux box is using python3 and some of my colleagues are still using python2, but once everybody agreed on a given virtualenv configuration, everything went fine) -s
On 02/10/2011 04:45 PM, Sebastien Binet wrote:
David,
On Thu, 10 Feb 2011 14:30:37 +0900, David<david@silveregg.co.jp> wrote:
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:
great news !
You need a recent waf checkout (trunk), and you build numpy as follows:
$waf_checkout/waf-light configure $waf_checkout/waf-light build
why don't you just put the waf executable within the numpy repository ?
Because it is still experimental, and there are some issues in waf around tools on windows, etc... meaning I will have to follow trunk pretty closely after those bugs are fixed. This is also not intended to be merged. The goal really is to discover as many issues as possible before I decide to use waf exclusively as the build "backend" in bento instead of my own (if you are interested, there is already a proof of concept of building simple extensions with waf inside bento in bento repo: https://github.com/cournape/Bento/tree/master/examples/hooks/waf/waf16) cheers, David
Thu, 10 Feb 2011 14:30:37 +0900, David wrote: [clip]
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:
Looks great to me, and it even seems to work :) The structure of the build appears to be more easy to understand than in the Scons-based system, not to speak of distutils (the waf guys clearly have their heads screwed on the right way). Pauli
On Thu, Feb 10, 2011 at 10:06 PM, Pauli Virtanen <pav@iki.fi> wrote:
Thu, 10 Feb 2011 14:30:37 +0900, David wrote: [clip]
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:
Looks great to me, and it even seems to work :)
not sure how I should take the "it even seems to work" :)
The structure of the build appears to be more easy to understand than in the Scons-based system, not to speak of distutils
the beauty of it is that waf itself is not much bigger than numpy.distutils itself in terms of amount of code, and while "opiniated", the waf's codebase is pretty readable, cheers, David
participants (4)
-
David -
David Cournapeau -
Pauli Virtanen -
Sebastien Binet