def collect_installed_distributions():
"""Yield the normalized spec and the names of top_level modules of all installed packages."""
for distribution in pkg_resources.working_set:
distribution_spec = str(distribution.as_requirement())
distribution_top_level = guess_top_level(distribution)
yield distribution_spec, distribution_top_level
评论列表
文章目录