def compare_versions(v1_raw, v2_raw):
    """
    Parses v1_raw and v2_raw into versions and compares them
    Returns 'equal' if v1 == v2
    Returns 'greater' if v1 > v2
    Returns 'lower' if v1 < v2
    """
    v1 = v1_raw.replace('-rc', '')
    v2 = v2_raw.replace('-rc', '')
    v1_split = v1.split('.')
    v2_split = v2.split('.')
    min_range = min(len(v1_split), len(v2_split))
    for i in range(min_range):
        if v1_split[i] == v2_split[i]:
            continue
        if v1_split[i] > v2_split[i]:
            return 'greater'
        if v1_split[i] < v2_split[i]:
            return 'lower'
    if min_range > 2:
        v1_is_rc = '-rc' in v1_raw
        v2_is_rc = '-rc' in v2_raw
        if not v1_is_rc and v2_is_rc:
            return 'greater'
        elif v1_is_rc and not v2_is_rc:
            return 'lower'
    return 'equal'
