List info for a package

def info(package, conn=None):
    '''
    List info for a package
    '''
    close = False
    if conn is None:
        close = True
        conn = init()

    fields = (
        'package',
        'version',
        'release',
        'installed',
        'os',
        'os_family',
        'dependencies',
        'os_dependencies',
        'os_family_dependencies',
        'summary',
        'description',
    )
    data = conn.execute(
        'SELECT {0} FROM packages WHERE package=?'.format(','.join(fields)),
        (package, )
    )
    row = data.fetchone()
    if close:
        conn.close()
    if not row:
        return None

    formula_def = dict(list(zip(fields, row)))
    formula_def['name'] = formula_def['package']

    return formula_def