Reimplementation of make in Python