check SOURCE_DIR before set generate_messages_py