def build_options(port, source):
    """Create a configuration dict suitable to be used when deploying the GUI.

    Return None if no customized options are present.
    """
    options = {}
    if port is not None:
        options['port'] = port
    if source is not None:
        user, branch = source
        value = 'https://github.com/{}/juju-gui.git {}'.format(user, branch)
        options['juju-gui-source'] = value
    return options or None
