Exemplo n.º 1
0
 def iter_scripts_to_remove(
     dist: BaseDistribution,
     bin_dir: str,
 ) -> Iterator[str]:
     for entry_point in dist.iter_entry_points():
         if entry_point.group == "console_scripts":
             yield from _script_names(bin_dir, entry_point.name, False)
         elif entry_point.group == "gui_scripts":
             yield from _script_names(bin_dir, entry_point.name, True)
Exemplo n.º 2
0
def get_entrypoints(dist: BaseDistribution) -> Tuple[Dict[str, str], Dict[str, str]]:
    console_scripts = {}
    gui_scripts = {}
    for entry_point in dist.iter_entry_points():
        if entry_point.group == "console_scripts":
            console_scripts[entry_point.name] = entry_point.value
        elif entry_point.group == "gui_scripts":
            gui_scripts[entry_point.name] = entry_point.value
    return console_scripts, gui_scripts