Since this is python code buildlib could be called from build.py as a subroutine but the interface isn't correct for this to happen.