def setup(app, helper_module, extra_args=None, use_cms=False):
    """
    Setup the Django / django CMS environment and return the environment settings.

    :param app: application
    :param helper_module: helper module
    :param extra_args: list of extra arguments
    :param use_cms: setup a django CMS environemtn
    :return: Django settings module
    """
    helper = helper_module.__file__
    argv = [os.path.basename(helper), app, 'setup', '--extra-settings={0}'.format(helper)]
    if use_cms:
        argv.append('--cms')
    if extra_args:
        argv.extend(extra_args)
    return runner(argv)