Ejemplo n.º 1
0
def _iter_project_names(pkgs):
    for pkg in pkgs:
        try:
            ns, name = namespace.split_name(pkg)
        except namespace.NamespaceError:
            log.warning("unknown namespace in '%s' - ignoring", pkg)
        else:
            yield ns.pip_info(name).project_name, pkg
Ejemplo n.º 2
0
def _pip_info(pkg):
    try:
        ns, req = namespace.split_name(pkg)
    except namespace.NamespaceError as e:
        terms = " ".join(pkg.split("/")[1:])
        cli.error(
            "unsupported namespace %s in '%s'\n"
            "Try 'guild search %s -a' to find matching packages."
            % (e.value, pkg, terms))
    else:
        return ns.pip_info(req)
Ejemplo n.º 3
0
def _project_name(req):
    ns, project_name = namespace.split_name(req)
    pip_info = ns.pip_info(project_name)
    return pip_info.project_name