Example #1
0
def get_local_repos():
    """
    Find all easy_install repositories on sys.path
    """
    repos = []
    for dirname in remove_eggs_from_path(sys.path):
        if os.path.exists(os.path.join(dirname, "easy-install.pth")):
            repo = EasyInstallRepository(location=dirname)
            repos.append(repo)
    return repos
    def test_all_packages(self):
        """Can we see packages in site_packages."""
        repos = []
        for dirname in remove_eggs_from_path(sys.path):
            repo = EasyInstallRepository(location=dirname)
            print ("Reading %s..." % dirname)
            repo.build_package_list()
            print ("done.\n")

            repos.append(repo)

        for repo in repos:
            print repo.location
            for pkg in repo.active_packages:
                print "   ", pkg.name