def set_envvars(envvars, datadir=None, failures_filename=None, logsdir=None):
    """Return the environment variables with which to run fake-juju.

    @param envvars: The env dict to update.
    @param datadir: The fake-juju data directory.
    @param failures_filename: The path to the failures file that
        fake-juju will use.
    @params logsdir: The path to the directory where fake-juju will
        write its log files.
    """
    envvars['FAKE_JUJU_DATA_DIR'] = datadir or ''
    envvars['FAKE_JUJU_FAILURES'] = failures_filename or ''
    envvars['FAKE_JUJU_LOGS_DIR'] = logsdir or ''
