environment/lib/python2.7/site-packages/distribute-0.6.31-py2.7.egg/setuptools/command/easy_install.py
def check_conflicts(self, dist):
        """Verify that there are no conflicting "old-style" packages"""

        return dist     # XXX temporarily disable until new strategy is stable
        from imp import find_module, get_suffixes
        from glob import glob

        blockers = []
        names = dict.fromkeys(dist._get_metadata('top_level.txt')) # XXX private attr

        exts = {'.pyc':1, '.pyo':1}     # get_suffixes() might leave one out
        for ext,mode,typ in get_suffixes():
            exts[ext] = 1

        for path,files in expand_paths([self.install_dir]+self.all_site_dirs):
            for filename in files:
                base,ext = os.path.splitext(filename)
                if base in names:
                    if not ext:
                        # no extension, check for package
                        try:
                            f, filename, descr = find_module(base, [path])
                        except ImportError:
                            continue
                        else:
                            if f: f.close()
                            if filename not in blockers:
                                blockers.append(filename)
                    elif ext in exts and base!='site':  # XXX ugh
                        blockers.append(os.path.join(path,filename))
        if blockers:
            self.found_conflicts(dist, blockers)

        return dist
def check_conflicts(self, dist):
        return dist     # XXX temporarily disable until new strategy is stable
        from imp import find_module, get_suffixes
        from glob import glob

        blockers = []
        names = dict.fromkeys(dist._get_metadata('top_level.txt')) # XXX private attr

        exts = {'.pyc':1, '.pyo':1}     # get_suffixes() might leave one out
        for ext,mode,typ in get_suffixes():
            exts[ext] = 1

        for path,files in expand_paths([self.install_dir]+self.all_site_dirs):
            for filename in files:
                base,ext = os.path.splitext(filename)
                if base in names:
                    if not ext:
                        # no extension, check for package
                        try:
                            f, filename, descr = find_module(base, [path])
                        except ImportError:
                            continue
                        else:
                            if f: f.close()
                            if filename not in blockers:
                                blockers.append(filename)
                    elif ext in exts and base!='site':  # XXX ugh
                        blockers.append(os.path.join(path,filename))
        if blockers:
            self.found_conflicts(dist, blockers)

        return dist
def check_conflicts ( self , dist ) : return dist # XXX temporarily disable until new strategy is stable from imp import find_module , get_suffixes from glob import glob blockers = [ ] names = dict . fromkeys ( dist . _get_metadata ( 'top_level.txt' ) ) # XXX private attr exts = { '.pyc' : 1 , '.pyo' : 1 } # get_suffixes() might leave one out for ext , mode , typ in get_suffixes ( ) : exts [ ext ] = 1 for path , files in expand_paths ( [ self . install_dir ] + self . all_site_dirs ) : for filename in files : base , ext = os . path . splitext ( filename ) if base in names : if not ext : # no extension, check for package try : f , filename , descr = find_module ( base , [ path ] ) except ImportError : continue else : if f : f . close ( ) if filename not in blockers : blockers . append ( filename ) elif ext in exts and base != 'site' : # XXX ugh blockers . append ( os . path . join ( path , filename ) ) if blockers : self . found_conflicts ( dist , blockers ) return dist
Verify that there are no conflicting "old-style" packages
Verify that there are no conflicting old - style packages