Move the makefile-based architecture to a Python one