reorganize the flask app start so that the sphinx make returns without error