Get top directories for the dependencies, based on external configuration.

    :return:
335303
def get_ext_tops(config):
    '''
    
    '''
    config = copy.deepcopy(config)
    alternatives = {}
    required = ['jinja2', 'yaml', 'tornado', 'msgpack']
    tops = []
    for ns, cfg in salt.ext.six.iteritems(config or {}):
        alternatives[ns] = cfg
        locked_py_version = cfg.get('py-version')
        err_msg = None
        if not locked_py_version:
            err_msg = 'Alternative Salt library: missing specific locked Python version'
        elif not isinstance(locked_py_version, (tuple, list)):
            err_msg = ('Alternative Salt library: specific locked Python version '
                       'should be a list of major/minor version')
        if err_msg:
            raise salt.exceptions.SaltSystemExit(err_msg)

        if cfg.get('dependencies') == 'inherit':
            # TODO: implement inheritance of the modules from _here_
            raise NotImplementedError('This feature is not yet implemented')
        else:
            for dep in cfg.get('dependencies'):
                mod = cfg['dependencies'][dep] or ''
                if not mod:
                    log.warning('Module %s has missing configuration', dep)
                    continue
                elif mod.endswith('.py') and not os.path.isfile(mod):
                    log.warning('Module %s configured with not a file or does not exist: %s', dep, mod)
                    continue
                elif not mod.endswith('.py') and not os.path.isfile(os.path.join(mod, '__init__.py')):
                    log.warning('Module %s is not a Python importable module with %s', dep, mod)
                    continue
                tops.append(mod)

                if dep in required:
                    required.pop(required.index(dep))

            required = ', '.join(required)
            if required:
                msg = 'Missing dependencies for the alternative version' \
                      ' in the external configuration: {}'.format(required)
                log.error(msg)
                raise salt.exceptions.SaltSystemExit(msg)
        alternatives[ns]['dependencies'] = tops
    return alternatives
14507
def get_base_modules():
    "  "

    return sorted(filter(
                  lambda x: op.isdir(op.join(MOD_DIR, x)),
                  listdir(MOD_DIR)))
619667
function getDirectRequires(p) {
      return p.dependencies.filter(function(d) {
        return DIRECT_REQUIRES_REG.test(d);
      }).map(function(d) {
        return "require('"+ getDependencyPath(d, p) +"');";
      }).join('\n');
    }
676562
def listdir(self, directory_path=None, hidden_files=False):
        
        # Change current directory if a directory path is specified, otherwise use current
        if directory_path:
            self.chdir(directory_path)

        # Exclude hidden files
        if not hidden_files:
            return [path for path in self.session.nlst() if not path.startswith('.')]

        # Include hidden files
        else:
            return self.session.nlst()
660173
def _GetDeps(self, dependencies):
    

    for dependency in dependencies:
      dep_desc = self.FindFileByName(dependency)
      yield dep_desc
      for parent_dep in dep_desc.dependencies:
        yield parent_dep
656202
def list_directory(self, *args, **kwargs):
		
		return tuple(self.dav_client().list(self.session_path()))
1043801
def get_install_requires_odoo_addons(addons_dir,
                                     depends_override={},
                                     external_dependencies_override={},
                                     odoo_version_override=None):
    
    addon_dirs = []
    addons = os.listdir(addons_dir)
    for addon in addons:
        addon_dir = os.path.join(addons_dir, addon)
        if is_installable_addon(addon_dir):
            addon_dirs.append(addon_dir)
    install_requires = set()
    for addon_dir in addon_dirs:
        r = get_install_requires_odoo_addon(
            addon_dir,
            no_depends=addons,
            depends_override=depends_override,
            external_dependencies_override=external_dependencies_override,
            odoo_version_override=odoo_version_override,
        )
        install_requires.update(r)
    return sorted(install_requires)
730512
def get_tasks(self):
        
        tasks = collections.OrderedDict()
        for dep in self.ordered_dependencies:
            tasks[dep.name] = dep.task

        return tasks
1183932
def getConfigDirectory():
		
		if platform.system() == 'Windows':
			return os.path.join(os.environ['APPDATA'], 'ue4cli')
		else:
			return os.path.join(os.environ['HOME'], '.config', 'ue4cli')
231240
def get_scheme_dirs():
    """"""
    scheme_glob = rel_to_cwd('schemes', '**', '*.yaml')
    scheme_groups = glob(scheme_glob)
    scheme_groups = [get_parent_dir(path) for path in scheme_groups]
    return set(scheme_groups)
791672
public static function getDirectories() {
        Logger::info("Resolving dependencies for project");
        $packages = array();
        $root = dirname(dirname(dirname(dirname(dirname(dirname(dirname(__FILE__)))))));
        $composer = file_get_contents($root . DIRECTORY_SEPARATOR . 'composer.json');
        $composer = json_decode($composer, true);
        if (array_key_exists('require', $composer) && !empty($composer['require'])) {
            foreach ($composer['require'] as $requirement => $version) {
                $packages = array_merge(self::readFile($requirement), $packages);
            }
        } else {
            Logger::trace("Project has no dependencies");
        }
        foreach ($packages as $package) {
            Logger::debug("Project references package %s", $package);
        }
        Logger::info("%d dependencies found", count($packages));
        return $packages;
    }
689918
def paths(self):
        """"""
        filename = '.mbed_cloud_config.json'
        return [
            # Global config in /etc for *nix users
            "/etc/%s" % filename,

            # Config file in home directory
            os.path.join(os.path.expanduser("~"), filename),

            # Config file in current directory
            os.path.join(os.getcwd(), filename),

            # Config file specified using environment variable
            os.environ.get(self.path_from_env_key)
        ]
802956
def get_distribution_paths(name):
    """"""
    pyver = 'python' + sys.version[:3]

    paths = {
        'prefix' : '{prefix}',
        'data'   : '{prefix}/lib/{pyver}/site-packages',
        'purelib': '{prefix}/lib/{pyver}/site-packages',
        'platlib': '{prefix}/lib/{pyver}/site-packages',
        'headers': '{prefix}/include/{pyver}/{name}',
        'scripts': '{prefix}/bin',
    }

    # pip uses a similar path as an alternative to the system's (read-only)
    # include directory:
    if hasattr(sys, 'real_prefix'):  # virtualenv
        paths['headers'] = os.path.abspath(
            os.path.join(sys.prefix, 'include', 'site', pyver, name))

    # Replacing vars
    for key, val in paths.items():
        paths[key] = val.format(prefix=PREFIX, name=name, pyver=pyver)
    return paths
1304685
def available_configuration_files(self):
        """"""
        known_files = [GLOBAL_CONFIG, LOCAL_CONFIG, self.environment.get('PIP_ACCEL_CONFIG')]
        absolute_paths = [parse_path(pathname) for pathname in known_files if pathname]
        return [pathname for pathname in absolute_paths if os.path.isfile(pathname)]
1014776
def tops(opts):
    '''
    
    '''
    if 'master_tops' not in opts:
        return {}
    whitelist = list(opts['master_tops'].keys())
    ret = LazyLoader(
        _module_dirs(opts, 'tops', 'top'),
        opts,
        tag='top',
        whitelist=whitelist,
    )
    return FilterDictWrapper(ret, '.top')
1293027
def get_path_directories():
    
    pth = os.environ['PATH']
    if sys.platform == 'win32' and os.environ.get("BASH"):
        # winbash has a bug..
        if pth[1] == ';':  # pragma: nocover
            pth = pth.replace(';', ':', 1)
    return [p.strip() for p in pth.split(os.pathsep) if p.strip()]
195846
def _get_config_dirs(self):
        
        _cwd = os.path.split(os.path.abspath(__file__))[0]
        _pdir = os.path.split(_cwd)[0]
        _etcdir = ''.join((_pdir, '/', 'etc/'))
        cfg_dirs = [
            self._fixpath(_cwd),
            self._fixpath('/etc/zvmsdk/'),
            self._fixpath('/etc/'),
            self._fixpath('~'),
            self._fixpath(_etcdir),
        ]
        return [x for x in cfg_dirs if x]