'Write conf.py and index.rst files necessary for Sphinx
We write minimal configurations that are necessary for Sphinx
to operate. We do not overwrite existing files so that
customizations are respected.'

def writerest_indexes(self, directory):

    try:
        os.makedirs(os.path.join(directory, 'artists'))
    except OSError as e:
        if (e.errno == errno.EEXIST):
            pass
        else:
            raise
    indexfile = os.path.join(directory, 'index.rst')
    if (not os.path.exists(indexfile)):
        with open(indexfile, 'w') as output:
            output.write(REST_INDEX_TEMPLATE)
    conffile = os.path.join(directory, 'conf.py')
    if (not os.path.exists(conffile)):
        with open(conffile, 'w') as output:
            output.write(REST_CONF_TEMPLATE)
