Choosing between Scons and Waf in Large Projects Choosing between Scons and Waf in Large Projects python python

Choosing between Scons and Waf in Large Projects


I have been developing a tool chain for our company that is built around waf. It targets Fedora, Ubuntu, Arch, Windows, Mac OSX and will be rolled out to our embedded devices doing cross-compilation on various hosts.

We have found the way that waf allows contained extensibility through the tools, features and other methods has made it incredibly easy to customise and extend for our projects.

Personally, I think it is brilliant and find it nicely abstracts the interfaces to different tools that are integrated.

Unfortunately, I have no in-depth experience with Scons but lots with GNU Make/Autotools. Our decision to go with waf after evaluating build tools was that we needed something that worked well everywhere which made our build tool being backed by python and that it was fast. I based my decision on these results and went from there.


In the past, SCons wasnt as performant, but lots of improvements have been added since then.

I like both options and had to make the same decision about 6 months ago. I went with SCons since it appears to have a larger user and support base.

Here is a helpful link that compares SCons to other build tools.


I personally prefer Waf because it's more flexible and doesn't have the variant directory issue.

Waf

Pros:

  • Separate variant directory; you don't clutter your source folder with object files (SCons also has this, but it's not on by default and takes a few tries to get working)
  • Very flexible
  • Automatic dependency sorting
  • Works on lots of Python versions(CPython 2, CPython 3, Jython, and PyPy)
  • You distribute it with your application, so users just need Python

Cons:

  • A pain to extend
  • Horribly underdocumented(although the examples help)
  • Doesn't differentiate between GCC and Clang well(not sure if SCons has that problem too)

SCons

Pros:

  • Much simpler than Waf
  • Easier to extend than Waf(see here)
  • Somewhat better documented

Cons:

Bottom line

It depends on what you're looking for. In general, Waf seems very good at managing large projects(and not just because of speed), but, if you need to extend it, look elsewhere. On the other hand, SCons is much easier to use.

If you decide to go with Waf, just post your problems to the mailing list.