look for dependency that setuptools cannot check or that are too painful to
    install with setuptools
174613
def find_missing_modules():
    
    missing_modules = []

    for module in MODULES:
        try:
            __import__(module[1])
        except ImportError:
            missing_modules.append(module)
    return missing_modules
1206512
function forcedByDependencies(filename) {
	if (!/\.ts$/.test(filename)) return null;
	var fs = require('fs');
	var fsp = require('path');
	function loadPackage(dir) {
		var path = fsp.join(dir, 'package.json');
		if (fs.existsSync(path)) return require(path);
		var ndir = fsp.join(dir, '..');
		if (ndir.length < dir.length && !/[\\\/]node_modules$/.test(ndir)) return loadPackage(ndir);
		else return null;
	}
	var pkg = loadPackage(fsp.resolve(fsp.dirname(filename)));
	if (!pkg) return false;
	return Object.keys(pkg.dependencies || {}).indexOf('streamline-runtime') >= 0 ||
		Object.keys(pkg.devDependencies || {}).indexOf('streamline-runtime') >= 0;
}
539606
def dependency_failed(test, results):
        """"""
        for d in (NoseDepUtils.test_name(i) for i in dependencies[test]):
            if results.get(d) and results.get(d) != 'passed':
                return "Required test '{}' {}".format(d, results.get(d).upper())
        return None
907293
function lookForExternalDependenciesJS( _def, javascriptSources ) {
  if ( !_def ) return;
  try {
    const def = convertExternalDependencyDefinition( _def );
    Object.keys( def ).forEach( function ( js ) {
      const
      filename = `mod/${js}`,
      src = new Source( Project, filename ),
      code = src.read();
      pushUnique( javascriptSources, code );
    } );
  } catch ( ex ) {
    Fatal.fire(
      `Unable to parse JS dependencies: ${JSON.stringify(_def)}!\n${ex}`,
      javascriptSources
    );
  }
}
572981
def check_dependency(self, dependency_path):
        """"""
        stored_hash = self._stamp_file_hashes.get(dependency_path)

        # This file was newly added, or we don't have a file
        # with stored hashes yet. Assume out of date.
        if not stored_hash:
            return False

        return stored_hash == _sha1_for_file(dependency_path)
466239
def check_dependencies(dependencies, module):
    
    if type(dependencies) == str:
        dependencies = [dependencies]
    elif type(dependencies) != list:
        raise TypeError('dependencies argument must be of type list or string')

    for dependency in dependencies:
        if dependency not in settings.INSTALLED_APPS:
            raise DependencyError('%s depends on %s, which should be in settings.INSTALLED_APPS' % (module, dependency))
1213510
function available(dependencies) {
    if (!dependencies) return false;

    return Object.keys(dependencies).every(function every(key) {
      var dependency = dependencies[key];

      if (!dependency) return false;

      if (dependency.name !== name) return true;
      if (dependency.version === version) return true;

      return false;
    });
  }
682694
def depends_on(self, dependency):
        
        packages = self.package_info()
        return [package for package in packages if dependency in package.get("requires", "")]
1129727
function(loader, packageJSON, isRoot){
		var deps = crawl.getDependencyMap(loader, packageJSON, isRoot);

		var dependencies = [];
		for(var name in deps) {
			dependencies.push(deps[name]);
		}

		return dependencies;
	}
1291215
def dependencies(dist, recursive=False, info=False):
    """"""

    def case_sorted(items):
        """Return unique list sorted in case-insensitive order."""
        return sorted(set(items), key=lambda i: i.lower())

    def requires(distribution):
        """Return the requirements for a distribution."""
        if recursive:
            req = set(pkg_resources.require(distribution.project_name))
            req.remove(distribution)
            return {r.as_requirement() for r in req}
        return distribution.requires()

    def modifier(distribution):
        """Return project's name or full requirement string."""
        return str(distribution) if info else distribution.project_name

    return case_sorted(modifier(r) for r in requires(dist))
24261
private String collectDependenciesWithoutDefinedManager(String rootDirectory, List<DependencyInfo> dependencyInfos){
        String error = null;
        try {
            collectDepDependencies(rootDirectory, dependencyInfos);
            goDependencyManager = GoDependencyManager.DEP;
        } catch (Exception e){
            try {
                collectGoDepDependencies(rootDirectory, dependencyInfos);
                goDependencyManager = GoDependencyManager.GO_DEP;
            } catch (Exception e1){
                try {
                    collectVndrDependencies(rootDirectory, dependencyInfos);
                    goDependencyManager = GoDependencyManager.VNDR;
                } catch (Exception e2) {
                    try {
                        collectGoGradleDependencies(rootDirectory, dependencyInfos);
                        goDependencyManager = GoDependencyManager.GO_GRADLE;
                    } catch (Exception e3) {
                        try {
                            collectGlideDependencies(rootDirectory, dependencyInfos);
                            goDependencyManager = GoDependencyManager.GLIDE;
                        } catch (Exception e4) {
                            try {
                                collectGoVendorDependencies(rootDirectory, dependencyInfos);
                                goDependencyManager = GoDependencyManager.GO_VENDOR;
                            } catch (Exception e5) {
                                try {
                                    collectGoPMDependencies(rootDirectory, dependencyInfos);
                                    goDependencyManager = GoDependencyManager.GOPM;
                                } catch (Exception e6) {
                                    error = "Couldn't collect dependencies - no dependency manager is installed";
                                }
                            }
                        }
                    }
                }
            }
        }
        return error;
    }
1300078
def get_requirements(lookup=None):
    ''''''

    if lookup == None:
        lookup = get_lookup()

    install_requires = []
    for module in lookup['INSTALL_REQUIRES']:
        module_name = module[0]
        module_meta = module[1]
        if "exact_version" in module_meta:
            dependency = "%s==%s" %(module_name,module_meta['exact_version'])
        elif "min_version" in module_meta:
            if module_meta['min_version'] == None:
                dependency = module_name
            else:
                dependency = "%s>=%s" %(module_name,module_meta['min_version'])
        install_requires.append(dependency)
    return install_requires
1110241
private void validateInstall() throws SetupException {
        // check if rdeck.base is defined.
        if (null == parameters.getBaseDir() || parameters.getBaseDir().equals("")) {
            throw new SetupException("rdeck.base property not defined or is the empty string");
        }
        if (!checkIfDir("rdeck.base", parameters.getBaseDir())) {
            throw new SetupException(parameters.getBaseDir() + " is not a valid rdeck install");
        }
    }
484255
function searchDependencies (dependencies, root) {
  if (!dependencies) {
    return Promise.resolve([])
  } else {
    var pluginPkgPath
    var pluginPkgPaths = []
    for (var key in dependencies) {
      pluginPkgPath = path.join(root, 'node_modules', key)
      pluginPkgPaths.push(pluginPkgPath)
    }
    return Promise.all(pluginPkgPaths.map(function (pkgRoot) {
      var pkgPath = path.join(pkgRoot, 'package.json')
      return readJSON(pkgPath)
        .then(function (pkg) {
          if (pkg.vigour && pkg.vigour.plugin) {
            return searchDependencies(pkg.dependencies, pkgRoot)
              .then(function (deps) {
                return searchDependencies(pkg.dependencies, root)
                  .then(function (otherDeps) {
                    return deps.concat(otherDeps)
                  })
              })
          } else {
            return false
          }
        })
        .catch(function (reason) {
          return false
        })
    }))
    .then(function (arr) {
      arr = _flatten(arr)
      return pluginPkgPaths.concat(arr.reduce(function (prev, curr) {
        if (curr) {
          prev.push(curr)
        }
        return prev
      }, []))
    })
  }
}
676337
def install_requirements(self, requires):
        
        # Temporarily install dependencies required by setup.py before trying to import them.
        sys.path[0:0] = ['setup-requires']
        pkg_resources.working_set.add_entry('setup-requires')

        to_install = list(self.missing_requirements(requires))
        if to_install:
            cmd = [sys.executable, "-m", "pip", "install",
                "-t", "setup-requires"] + to_install
            subprocess.call(cmd)
1272544
def check_depdendencies():
    
    # Get installed packages
    installed_packages = pip.get_installed_distributions(local_only=False)
    installed_packages_list = sorted(["%s==%s" % (i.key, i.version) for i in installed_packages])

    # Now check if each package specified in requirements.txt is actually installed
    deps_filename = os.path.join(ROOT_INSTALL_PATH, "requirements.txt")
    with open(deps_filename, "r") as f:
        for dep in f.read().split():
            if not dep.lower() in installed_packages_list:
                raise SystemCheckError("Required dependency %s is not installed. Please run 'pip install -e .'" % dep)
1167235
def python_dependencies(context: Context, extras=None):
    
    with mock.patch('setuptools.setup'):
        from setup import install_requires, extras_require

        requirements = install_requires.copy()
        if extras:
            requirements.extend(extras_require[extras])
    return context.pip_command('install', *requirements)