@staticmethod
    def _find_msvcrt_manifest_files(name):
        """Search the system for candidate MSVCRT manifest files.

        This method yields (manifest_file,msvcrt_dir) tuples giving a candidate
        manifest file for the given assembly name, and the directory in which
        the actual assembly data files are found.
        """
        cls = bdist_esky
        #  Search for redist files in a Visual Studio install
        progfiles = os.path.expandvars("%PROGRAMFILES%")
        for dnm in os.listdir(progfiles):
            if dnm.lower().startswith("microsoft visual studio"):
                dpath = os.path.join(progfiles,dnm,"VC","redist")
                for (subdir,_,filenames) in os.walk(dpath):
                    for fnm in filenames:
                        if name.lower() in fnm.lower():
                            if fnm.lower().endswith(".manifest"):
                                mf = os.path.join(subdir,fnm)
                                md = cls._find_msvcrt_dir_for_manifest(name,mf)
                                if md is not None:
                                    yield (mf,md)
        #  Search for manifests installed in the WinSxS directory
        winsxs_m = os.path.expandvars("%WINDIR%\\WinSxS\\Manifests")
        for fnm in os.listdir(winsxs_m):
            if name.lower() in fnm.lower():
                if fnm.lower().endswith(".manifest"):
                    mf = os.path.join(winsxs_m,fnm)
                    md = cls._find_msvcrt_dir_for_manifest(name,mf)
                    if md is not None:
                        yield (mf,md)
        winsxs = os.path.expandvars("%WINDIR%\\WinSxS")
        for fnm in os.listdir(winsxs):
            if name.lower() in fnm.lower():
                if fnm.lower().endswith(".manifest"):
                    mf = os.path.join(winsxs,fnm)
                    md = cls._find_msvcrt_dir_for_manifest(name,mf)
                    if md is not None:
                        yield (mf,md)
dataset/ETHPy150Open cloudmatrix/esky/esky/bdist_esky/__init__.py/bdist_esky._find_msvcrt_manifest_files/original