environment/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg/pip/req.py
def check_if_exists(self):
        """Find an installed distribution that satisfies or conflicts
        with this requirement, and set self.satisfied_by or
        self.conflicts_with appropriately."""
        if self.req is None:
            return False
        try:
            self.satisfied_by = pkg_resources.get_distribution(self.req)
        except pkg_resources.DistributionNotFound:
            return False
        except pkg_resources.VersionConflict:
            existing_dist = pkg_resources.get_distribution(self.req.project_name)
            if self.use_user_site:
                if dist_in_usersite(existing_dist):
                    self.conflicts_with = existing_dist
                elif running_under_virtualenv() and dist_in_site_packages(existing_dist):
                    raise InstallationError("Will not install to the user site because it will lack sys.path precedence to %s in %s"
                                            %(existing_dist.project_name, existing_dist.location))
            else:
                self.conflicts_with = existing_dist
        return True
def check_if_exists(self):
        if self.req is None:
            return False
        try:
            self.satisfied_by = pkg_resources.get_distribution(self.req)
        except pkg_resources.DistributionNotFound:
            return False
        except pkg_resources.VersionConflict:
            existing_dist = pkg_resources.get_distribution(self.req.project_name)
            if self.use_user_site:
                if dist_in_usersite(existing_dist):
                    self.conflicts_with = existing_dist
                elif running_under_virtualenv() and dist_in_site_packages(existing_dist):
                    raise InstallationError("Will not install to the user site because it will lack sys.path precedence to %s in %s"
                                            %(existing_dist.project_name, existing_dist.location))
            else:
                self.conflicts_with = existing_dist
        return True
def check_if_exists ( self ) : if self . req is None : return False try : self . satisfied_by = pkg_resources . get_distribution ( self . req ) except pkg_resources . DistributionNotFound : return False except pkg_resources . VersionConflict : existing_dist = pkg_resources . get_distribution ( self . req . project_name ) if self . use_user_site : if dist_in_usersite ( existing_dist ) : self . conflicts_with = existing_dist elif running_under_virtualenv ( ) and dist_in_site_packages ( existing_dist ) : raise InstallationError ( "Will not install to the user site because it will lack sys.path precedence to %s in %s" % ( existing_dist . project_name , existing_dist . location ) ) else : self . conflicts_with = existing_dist return True
Find an installed distribution that satisfies or conflicts
        with this requirement, and set self.satisfied_by or
        self.conflicts_with appropriately.
Find an installed distribution that satisfies or conflicts with this requirement and set self . satisfied_by or self . conflicts_with appropriately .