Resolve the requirements specified in the Jimfile for each bundle to `paths`
 Raises MissingFile error
195107
def resolve!
      self.bundles.each do |bundle_name, requirements|
        self.paths[bundle_name] = []
        requirements.each do |name, version|
          path = self.index.find(name, version)
          if !path
            raise(MissingFile,
            "Could not find #{name} #{version} in any of these paths #{index.directories.join(':')}")
          end
          self.paths[bundle_name] << [path, name, version]
        end
      end
      paths
    end
497646
private void addFilePathMapping(BundlePathMapping bundlePathMapping, Set<String> paths) {
		for (String path : paths) {
			addFilePathMapping(bundlePathMapping, path);
		}
	}
512198
def requireExecutables(executables):
    
    missingExecutables = []
    for executable in executables:
        if getPathOfExecutable(executable) is None:
            missingExecutables.append(executable)
    if len(missingExecutables) > 0:
        log("In order to run this script, the following "
            "executables need to be on the path:")
        for missingExecutable in missingExecutables:
            log(missingExecutable)
        exit(1)
1054695
def build_requirements(docs_path, package_name="yacms"):
    
    mezz_string = "yacms=="
    project_path = os.path.join(docs_path, "..")
    requirements_file = os.path.join(project_path, package_name,
                                     "project_template", "requirements.txt")
    with open(requirements_file, "r") as f:
        requirements = f.readlines()
    with open(requirements_file, "w") as f:
        f.write("yacms==%s\n" % __version__)
        for requirement in requirements:
            if requirement.strip() and not requirement.startswith(mezz_string):
                f.write(requirement)
1241853
def resolve_egg_link(path):
    
    referenced_paths = non_empty_lines(path)
    resolved_paths = (
        os.path.join(os.path.dirname(path), ref)
        for ref in referenced_paths
    )
    dist_groups = map(find_distributions, resolved_paths)
    return next(dist_groups, ())
1139777
def resolve!(path, **kargs)
      uri, deps = resolve(path, **kargs)

      unless uri
        message = String.new("couldn't find file '#{path}'")

        if relative_path?(path) && kargs[:base_path]
          load_path, _ = paths_split(config[:paths], kargs[:base_path])
          message << " under '#{load_path}'"
        end

        message << " with type '#{kargs[:accept]}'" if kargs[:accept]

        load_paths = kargs[:load_paths] || config[:paths]
        message << "\nChecked in these paths: \n  #{ load_paths.join("\n  ") }"

        raise FileNotFound, message
      end

      return uri, deps
    end
563253
def resolve_path(source, required)
      Pathname.new(source).dirname.join(required.to_str).cleanpath.to_path
    end
359294
function resolveImportPaths(filePath, importPaths){
  var dir = path.dirname(filePath);
  return importPaths.map(function(relativePath){
    if(!path.extname(relativePath)){
      relativePath += '.less';
    }
    return path.resolve(dir, relativePath);
  });
}
161147
function resolve(to, importPath, fileType) {
  importPath =
    path.extname(importPath) === '' ? `${importPath}.${fileType}` : importPath
  if (importPath.startsWith('/')) {
    return importPath
  } else if (matchModuleImport.test(importPath)) {
    return require.resolve(importPath.replace(matchModuleImport, ''))
  }
  return path.join(path.dirname(to), importPath)
}
1364372
function getFiles(packageName,files,bundledFile){
	    	if(!traversed_bundles[packageName]){
	    		traversed_bundles[packageName] = true;
	    		var bundle = resourcesJs.bundles[packageName];
	    		if(bundle){
		    		bundle.bundled = bundledFile;
	    			for(var i in bundle.on){
	    				files = getFiles(bundle.on[i],files);
	    			}
	    			for(var i in bundle.js){
	    				var file = dir+ "/" + bundle.js[i];
	    				if(!traversed_files[file]){
	    					files.push(file);
	    					traversed_files[file] = true;
	    				}
	    			}
	    		}
	    	}
	    	return files;
	    }
1202324
def require_files(glob, root_path = app_root_path)
      Pathname.glob(root_path.join(glob)).each do |filename|
        require filename.expand_path
      end
    end
153917
def _resolve_deps(name, pkgs, **kwargs):
    '''
    
    '''
    missing_deps = []
    for pkg_file in pkgs:
        deb = apt.debfile.DebPackage(filename=pkg_file, cache=apt.Cache())
        if deb.check():
            missing_deps.extend(deb.missing_deps)

    if missing_deps:
        cmd = ['apt-get', '-q', '-y']
        cmd = cmd + ['-o', 'DPkg::Options::=--force-confold']
        cmd = cmd + ['-o', 'DPkg::Options::=--force-confdef']
        cmd.append('install')
        cmd.extend(missing_deps)

        ret = __salt__['cmd.retcode'](
            cmd,
            env=kwargs.get('env'),
            python_shell=False
        )

        if ret != 0:
            raise CommandExecutionError(
                'Error: unable to resolve dependencies for: {0}'.format(name)
            )
        else:
            try:
                cmd = ['apt-mark', 'auto'] + missing_deps
                __salt__['cmd.run'](
                    cmd,
                    env=kwargs.get('env'),
                    python_shell=False
                )
            except MinionError as exc:
                raise CommandExecutionError(exc)
    return
285652
def check(path_dir, requirements_name='requirements.txt'):
    ''''''
    requirements = _load_requirements(requirements_name, path_dir)
    imported_modules = _iter_modules(path_dir)
    installed_packages = _list_installed_packages()

    imported_modules.update(_excluded_imports())

    diff = {lib for lib in installed_packages if lib not in imported_modules}
    with_dependencies, _ = _list_dependencies(diff)
    unused_dependencies = sorted([d for d in diff if d in requirements])

    for unused_dependency in unused_dependencies:
        if with_dependencies.get(unused_dependency):
            print('    - {}'.format(unused_dependency))
            for dependency in with_dependencies.get(unused_dependency):
                print('\t - {}'.format(dependency))
        else:
            print('    - {}'.format(unused_dependency))
819864
def main(path_dir, requirements_name):
    """"""
    click.echo("\nWARNING: Uninstall libs it's at your own risk!")
    click.echo('\nREMINDER: After uninstall libs, update your requirements '
               'file.\nUse the `pip freeze > requirements.txt` command.')

    click.echo('\n\nList of installed libs and your dependencies added on '
               'project\nrequirements that are not being used:\n')

    check(path_dir, requirements_name)
42816
def _install_requirements(path):
    
    locations = [os.path.join(path, "_blueprint"), os.path.join(path, "_base"), path]
    success = True

    for location in locations:
        try:
            with open(os.path.join(location, "requirements.txt")):
                puts("\nRequirements file found at {0}".format(os.path.join(location, "requirements.txt")))
                install_reqs = raw_input("Install requirements now with pip install -r requirements.txt? [Y/n] ")
                if not install_reqs or install_reqs.lower() == 'y':
                    pip = sh.pip.bake(_cwd=location)
                    puts("\nInstalling requirements...")
                    puts(pip("install", "-r", "requirements.txt"))
                else:
                    success = False
                    puts("Not installing requirements. This may break everything! Vaya con dios.")
        except IOError:
            pass

    return success
480740
function injectRequirements(requirementsPath, packagePath, options) {
  const noDeploy = new Set(options.noDeploy || []);

  return fse
    .readFileAsync(packagePath)
    .then(buffer => JSZip.loadAsync(buffer))
    .then(zip =>
      BbPromise.resolve(
        glob.sync([path.join(requirementsPath, '**')], {
          mark: true,
          dot: true
        })
      )
        .map(file => [file, path.relative(requirementsPath, file)])
        .filter(
          ([file, relativeFile]) =>
            !file.endsWith('/') &&
            !relativeFile.match(/^__pycache__[\\/]/) &&
            !noDeploy.has(relativeFile.split(/([-\\/]|\.py$|\.pyc$)/, 1)[0])
        )
        .map(([file, relativeFile]) =>
          Promise.all([file, relativeFile, fse.statAsync(file)])
        )
        .map(([file, relativeFile, fileStat]) =>
          zipFile(zip, relativeFile, fse.readFileAsync(file), {
            unixPermissions: fileStat.mode
          })
        )
        .then(() => writeZip(zip, packagePath))
    );
}
629451
function resolve() {
            resolvePath(path, function (err, _resolvedPath) {
                if (err) {
                    if (err.code !== "ENOENT") {
                        return error(err);
                    }
                    // If checkSymlinks is on we'll get an ENOENT when creating a new file.
                    // In that case, just resolve the parent path and go from there.
                    resolvePath(dirname(path), function (err, dir) {
                        if (err) return error(err);
                        resolvedPath = join(dir, basename(path));
                        createTempFile();
                    });
                    return;
                }
                
                resolvedPath = _resolvedPath;
                createTempFile();
            });
        }