Look in sources for a manifest file, if any.
337258
def jarManifest(target, source, env, for_signature):
    """"""
    for src in source:
        contents = src.get_text_contents()
        if contents[:16] == "Manifest-Version":
            return src
    return ''
1144359
def find_directory_manifest(dirname)
      entries = File.directory?(dirname) ? Dir.entries(dirname) : []
      entry = entries.find { |e| e =~ MANIFEST_RE } ||
        generate_manifest_path
      File.join(dirname, entry)
    end
721590
def _get_versions_manifest(manifest_dir):
    
    all_pkgs = _manifest_progs + [p.get("name", p["cmd"]) for p in _cl_progs] + [p["name"] for p in _alt_progs]
    if os.path.exists(manifest_dir):
        out = []
        for plist in ["toolplus", "python", "r", "debian", "custom"]:
            pkg_file = os.path.join(manifest_dir, "%s-packages.yaml" % plist)
            if os.path.exists(pkg_file):
                with open(pkg_file) as in_handle:
                    pkg_info = yaml.safe_load(in_handle)
                if not pkg_info:
                    continue
                added = []
                for pkg in all_pkgs:
                    if pkg in pkg_info:
                        added.append(pkg)
                        out.append({"program": pkg, "version": pkg_info[pkg]["version"]})
                for x in added:
                    all_pkgs.remove(x)
        out.sort(key=lambda x: x["program"])
        for pkg in all_pkgs:
            out.append({"program": pkg, "version": ""})
        return out
1367929
def _parse_manifest(self):
        
        with open(self.manifest_file, 'r') as f:
            for line in f:
                if line.startswith("Version"):
                    self.mver, self.relnum = self._parse_version(line)
                lineitems = line.split('  ')
                if len(lineitems) == 2:
                    asset_url = self._get_url(lineitems[1][:-1])
                    yield grequests.get(asset_url, stream=True)
746481
def _get_install_sources(self):
        
        if not self._sources:
            return ''
        parts = ['--no-index']
        for source in self._sources:
            parts.append("--find-links '{0}'".format(source))
        return ' '.join(parts)
230902
def manifest
    if File.exists?(manifest_file) && File.readable?(manifest_file) then
      MultiJson.load(File.read(manifest_file))
    else
      {}
    end
  end
1058908
def get_manifest(self):
        """"""
        logger.debug("Getting manifest")
        text = self.get_text(self.get_manifest_key())
        return json.loads(text)
902889
def get_source_file_provenance(self, filename):
        """"""
        module_name = resolve.infer_module_name(filename, self.path)
        return resolve.Direct(filename, module_name)
921474
def read_manifest():
    
    # XXX modifies global state, which is kind of evil
    if not os.path.isfile('MANIFEST.in'):
        return
    ignore, ignore_regexps = _get_ignore_from_manifest('MANIFEST.in')
    IGNORE.extend(ignore)
    IGNORE_REGEXPS.extend(ignore_regexps)
1262266
def read_source_manifest(file_name):
    """"""
    alleles = {}
    open_function = open
    if file_name.endswith(".gz"):
        open_function = gzip.open
    with open_function(file_name, 'rb') as input_file:
        header_index = dict([
            (col_name, i) for i, col_name in
            enumerate(input_file.readline().rstrip("\r\n").split("\t"))
        ])
        for col_name in {"Name", "SNP", "IlmnStrand"}:
            if col_name not in header_index:
                msg = "{}: no column named {}".format(file_name, col_name)
                raise ProgramError(msg)

        for line in input_file:
            row = line.rstrip("\r\n").split("\t")
            marker_name = row[header_index["Name"]]
            the_alleles = row[header_index["SNP"]]
            strand = row[header_index["IlmnStrand"]]
            if (the_alleles == "[D/I]") or (the_alleles == "[I/D]"):
                # This is an indel, so we skip it
                continue
            top_alleles = illumina_to_snp(strand, the_alleles)
            allele1, allele2 = top_alleles.split(" ")
            alleles[marker_name] = {allele1, allele2}

    return alleles
995127
def find_sources(self):
        
        app_configs = apps.get_app_configs()
        for app_config in app_configs:
            ignore_dirs = []
            for root, dirs, files in os.walk(app_config.path):
                if [True for idir in ignore_dirs if root.startswith(idir)]:
                    continue
                if '__init__.py' not in files:
                    ignore_dirs.append(root)
                    continue
                for filename in files:
                    basename, ext = os.path.splitext(filename)
                    if ext != '.py':
                        continue
                    yield os.path.abspath(os.path.join(root, filename))
1014530
function findResource(name, filepath, extList) {
  var candidates = [name, path.join(name, 'index')];
  var baseName = path.basename(name);
  if (baseName && baseName !== '.' && baseName !== '..') {
    candidates.push(path.join(name, baseName));
  }
  var info = null;

  candidates.every(function(candidate) {
    info = fis.uri(candidate, filepath);

    for (var i = 0, len = extList.length; i < len && !info.file; i++) {
      info = fis.uri(candidate + extList[i], filepath);
    }

    if (info && info.file) {
      return false;
    }

    return true;
  });

  return info;
}
139109
def jarSources(target, source, env, for_signature):
    """"""
    try:
        env['JARCHDIR']
    except KeyError:
        jarchdir_set = False
    else:
        jarchdir_set = True
        jarchdir = env.subst('$JARCHDIR', target=target, source=source)
        if jarchdir:
            jarchdir = env.fs.Dir(jarchdir)
    result = []
    for src in source:
        contents = src.get_text_contents()
        if contents[:16] != "Manifest-Version":
            if jarchdir_set:
                _chdir = jarchdir
            else:
                try:
                    _chdir = src.attributes.java_classdir
                except AttributeError:
                    _chdir = None
            if _chdir:
                # If we are changing the dir with -C, then sources should
                # be relative to that directory.
                src = SCons.Subst.Literal(src.get_path(_chdir))
                result.append('-C')
                result.append(_chdir)
            result.append(src)
    return result
1191476
def _manifest(self):
        """"""
        if self._manifest_cache is None:
            self._manifest_cache = self._storage_broker.get_manifest()

        return self._manifest_cache
1235760
def load_manifest(raw_manifest, namespace=None, **kwargs):
    
    if isinstance(raw_manifest, configparser.RawConfigParser):
        return Manifest(raw_manifest)

    manifest = create_configparser()

    if not manifest.has_section('config'):
        manifest.add_section('config')

    _load_manifest_interpret_source(manifest,
                                    raw_manifest,
                                    **kwargs)
    return Manifest(manifest, namespace=namespace)
825154
def load_manifest(check_name):
    
    manifest_path = os.path.join(get_root(), check_name, 'manifest.json')
    if file_exists(manifest_path):
        return json.loads(read_file(manifest_path))
    return {}
1060477
def find_manifest
      ARGV.each do |arg|
        if arg =~ /\.json$|\.rb$|\.yml$/
          return arg unless ARGV[ARGV.find_index(arg) - 1].eql?("--cluster-file")
        end
      end
    end