[Numpy-discussion] Waf or scons/numscons for a C/Fortran/Cython/Python project -- what's your recommendation?

Dag Sverre Seljebotn dagss at student.matnat.uio.no
Sat Jan 16 15:38:22 EST 2010

Kurt Smith wrote:
> My questions here concern those familiar with configure/build/install
> systems such as distutils, setuptools, scons/numscons or waf
> (particularly David Cournapeau).
> I'm creating a tool known as 'fwrap' that has a component that needs
> to do essentially what f2py does now -- take fortran source code and
> compile it into a python extension module.  It uses Cython to create
> the extension module, and the current configure/build/install system
> is a very kludgy monkeypatched Cython.distutils and numpy.distutils
> setup.py script.  The setup.py script works for testing on my system
> here, but for going prime time, I dread using it.  David has made his
> critiques of distutils known for scientific software, and I agree.
> What's the best alternative?
> More specifically: what are the pros/cons between waf and
> scons/numscons for configure/build/install of a
> Fortran-C-Cython-Python project?
> Is scons capable of handling the configure and install stages, or is
> it only a build system?  As I understand it, numscons is called from
> distutils; distutils handles the configure/install stages.
> Scons/numscons have more fortran support that waf, from what I can
> see.  The main downside of using scons is that I'd still have to mess
> around with distutils.
Not that I really know anything about it, but note that one of the 
purposes of David's toydist is to handle the install stage independently 
of the build system used. That is, it is able to create e.g. Python eggs 
without using setuptools.

The thing is, installing Python software is something of a mess, and 
every system would want this done differently (making an Ubuntu package, 
creating a DMG, or creating a Python egg are all different things). So I 
think it makes sense to decouple this from the build in the tools that 
are used.

Of course, toydist is beta, and I dare say you have enough beta 
dependencies for fwrap already :-)

Dag Sverre
> It looks like waf has explicit support for all three stages, and could
> be just what I'm looking for.  David has a few threads on the
> waf-users list about getting fortran working with waf.  Has that
> progressed much?  I want to contribute to this, for the benefit of
> scipy and my project, and to limit duplicated work.  From what I
> gather, the fortran configuration stuff in numscons is separated
> nicely from the scon-specific stuff :-)  Would it be a matter of
> porting the numscons fortran stuff into waf?
> Any comments you have on using waf/scons for numerical projects would
> be welcome!
> Kurt
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion

More information about the NumPy-Discussion mailing list