Update the python build script to build sources if dependencies are changed.