I'm currently working on a build tool that doesn't work using the traditional "makefile" approach. Instead it's designed as a Python library, and you have the full power of Python at your disposal.
Sadly it's not ready for prime-time yet (early designing stage), so I won't link my highly unfinished project.