def _extract_project_version(requirement):
    """
    Extract the information on a concrete project version from pkg_configs Requirement information.

    :param requirement: A pkg_config Requirement
    :return: Pair of project_name and version
    """
    specs = requirement.specs
    if len(specs) == 1:
        spec = specs[0]
        if spec[0] == '==':
            return requirement.project_name, spec[1]
        else:
            raise ValueError(
                'Versions must be specified exactly. "{}" is not an exact version specification.'
                .format(requirement))
    elif len(specs) > 1:
        raise ValueError(
            'Multiple version specifications on a single line are not supported.'
            )
    else:
        raise ValueError('Version specification is missing for "{}".'.
            format(requirement))
