Add any required dependencies.
495092
def resolve_dependencies(self, to_build, depender):
		
		shutit_global.shutit_global_object.yield_to_draw()
		self.log('In resolve_dependencies',level=logging.DEBUG)
		cfg = self.cfg
		for dependee_id in depender.depends_on:
			dependee = self.shutit_map.get(dependee_id)
			# Don't care if module doesn't exist, we check this later
			if (dependee and dependee not in to_build
			    and cfg[dependee_id]['shutit.core.module.build_ifneeded']):
				to_build.append(dependee)
				cfg[dependee_id]['shutit.core.module.build'] = True
		return True
797603
protected function requireDependencies()
    {
        if (!empty($this->pharLocation)) {
            include_once 'phar://' . $this->pharLocation . '/vendor/autoload.php';
        }

        // check 2.x version (composer/phar)
        if (class_exists('PDepend\\TextUI\\Runner')) {
            return;
        }

        $this->oldVersion = true;

        // check 1.x version (composer)
        if (class_exists('PHP_Depend_TextUI_Runner')) {
            // include_path hack for PHP_Depend 1.1.3
            $rc = new ReflectionClass('PHP_Depend');
            set_include_path(get_include_path() . ":" . realpath(dirname($rc->getFileName()) . "/../"));

            return;
        }

        @include_once 'PHP/Depend/Autoload.php';

        if (!class_exists('PHP_Depend_Autoload')) {
            throw new BuildException(
                'PhpDependTask depends on PHP_Depend being installed and on include_path',
                $this->getLocation()
            );
        }

        // register PHP_Depend autoloader
        $autoload = new PHP_Depend_Autoload();
        $autoload->register();
    }
393300
def consolidate_dependencies(needs_ipython, child_program,
                             requirement_files, manual_dependencies):
    """"""
    # We get the logger here because it's not defined at module level
    logger = logging.getLogger('fades')

    if needs_ipython:
        logger.debug("Adding ipython dependency because --ipython was detected")
        ipython_dep = parsing.parse_manual(['ipython'])
    else:
        ipython_dep = {}

    if child_program:
        srcfile_deps = parsing.parse_srcfile(child_program)
        logger.debug("Dependencies from source file: %s", srcfile_deps)
        docstring_deps = parsing.parse_docstring(child_program)
        logger.debug("Dependencies from docstrings: %s", docstring_deps)
    else:
        srcfile_deps = {}
        docstring_deps = {}

    all_dependencies = [ipython_dep, srcfile_deps, docstring_deps]

    if requirement_files is not None:
        for rf_path in requirement_files:
            rf_deps = parsing.parse_reqfile(rf_path)
            logger.debug('Dependencies from requirements file %r: %s', rf_path, rf_deps)
            all_dependencies.append(rf_deps)

    manual_deps = parsing.parse_manual(manual_dependencies)
    logger.debug("Dependencies from parameters: %s", manual_deps)
    all_dependencies.append(manual_deps)

    # Merge dependencies
    indicated_deps = {}
    for dep in all_dependencies:
        for repo, info in dep.items():
            indicated_deps.setdefault(repo, set()).update(info)

    return indicated_deps
1017296
void addDependency(String moduleName, String version) {

        try {
            m_dependencies.addComponent(
                new CmsRemovableFormRow<CmsModuleDependencyWidget>(
                    CmsModuleDependencyWidget.create(
                        new CmsModuleDependency(moduleName, new CmsModuleVersion(version))),
                    ""));
        } catch (Exception e) {
            CmsErrorDialog.showErrorDialog(e);
        }
    }
162206
public function addDependencies()
    {
        $this->Html->script('/attachments/js/vendor/jquery.ui.widget.js', ['block' => true]);
        $this->Html->script('/attachments/js/vendor/jquery.iframe-transport.js', ['block' => true]);
        $this->Html->script('/attachments/js/vendor/jquery.fileupload.js', ['block' => true]);
        $this->Html->script('/attachments/js/app/lib/AttachmentsWidget.js', ['block' => true]);
        $this->Html->css('/attachments/css/attachments.css', ['block' => true]);
    }
632095
def add_dependency(self, name, obj):
        """"""

        if name in self._deps:
            if self._deps[name] is obj:
                return
            raise ValueError(
                "There exists a different dep with the same name : %r" % name)
        self._deps[name] = obj
1212926
def save_dependencies(self, instance, schema):
        """"""
        def add_dependency(value):
            """Add parent Data dependency."""
            try:
                DataDependency.objects.update_or_create(
                    parent=Data.objects.get(pk=value),
                    child=self,
                    defaults={'kind': DataDependency.KIND_IO},
                )
            except Data.DoesNotExist:
                pass

        for field_schema, fields in iterate_fields(instance, schema):
            name = field_schema['name']
            value = fields[name]

            if field_schema.get('type', '').startswith('data:'):
                add_dependency(value)
            elif field_schema.get('type', '').startswith('list:data:'):
                for data in value:
                    add_dependency(data)
1147148
def require(self, product_type):
    
    self._dependencies.add(product_type)
    self._context.products.require(product_type)
759371
def i_depend_on_them(decl):
        """"""

        to_be_included = set()
        for dependency_info in get_dependencies_from_decl(decl):
            for ddecl in dependency_info.find_out_depend_on_it_declarations():
                if ddecl:
                    to_be_included.add(ddecl)

        if isinstance(decl.parent, class_declaration.class_t):
            to_be_included.add(decl.parent)
        return to_be_included
1117163
def add(self, addon, dev=False, interactive=True):
        """"""
        dependencies = self.get_dependency_manager(dev=dev)
        other_dependencies = self.get_dependency_manager(dev=not dev)
        existing = dependencies.get(addon)
        self.stdout.write(style.format_command('Adding', addon))
        dependencies.add(addon)
        try:
            # try running the build
            self.build()
            self.refresh()

            # remove version of this in other requirements file
            other_dependencies.remove(addon, warn=False)

            # run new addon constructor
            constructor_name = '%s.init' % Dependency(addon).module_name
            constructor = self.blueprints.get(constructor_name)

            if constructor:
                context = constructor.load_context().main(
                    [], standalone_mode=False
                )
                self.generate(constructor, context, interactive=interactive)
        except Exception as e:
            # restore original settings
            self.stdout.write(style.red(str(e)))
            self.stdout.write(
                style.yellow('Could not find %s' % addon)
            )
            dependencies.remove(addon)
            if existing:
                dependencies.add(existing)
            return
585162
public void addDependency(JSModule dep) {
    checkNotNull(dep);
    Preconditions.checkState(dep != this, "Cannot add dependency on self", this);
    deps.add(dep);
  }
415275
def _add_dependency(container, obj):
    '''
    
    '''
    if os.path.basename(obj.__file__).split('.')[0] == '__init__':
        container.append(os.path.dirname(obj.__file__))
    else:
        container.append(obj.__file__.replace('.pyc', '.py'))
306801
def add_dependencies(self, module):
        

        if module in self._processed_modules:
            return None

        if hasattr(module, "__name__"):
            mn = module.__name__
        else:
            mn = '<unknown>'

        _debug.debug("add_dependencies:module=%s", module)

        # If the module in which the class/function is defined is __main__, don't add it. Just add its dependencies.
        if mn == "__main__":
            self._processed_modules.add(module)

        # add the module as a dependency
        elif not self._add_dependency(module, mn):
            _debug.debug("add_dependencies:not added:module=%s", mn)
            return None

        _debug.debug("add_dependencies:ADDED:module=%s", mn)

        # recursively get the module's imports and add those as dependencies
        for dm in self._find_dependent_modules(module):
            _debug.debug("add_dependencies:adding dependent module %s for %s", dm, mn)
            self.add_dependencies(dm)
291723
def install(self, struct, ui, debug=False):
        
        # the system dependencies should always go first
        self.__add_dependencies(self.get_system_deptype_shortcut(), [])
        for dep_dict in struct:
            for dep_t, dep_l in dep_dict.items():
                self._process_dependency(dep_t, dep_l)
        if self.dependencies:
            self._install_dependencies(ui, debug)
619172
def add_package_dependency(self, package_name, version):
        
        if not PEP440_VERSION_PATTERN.match(version):
            raise ValueError('Invalid Version: "{}"'.format(version))
        self.dependencies.add(PackageDependency(package_name, version))
581064
def add_dependency(uri)
      self.config = hash_reassoc(config, :dependencies) do |set|
        set + Set.new([uri])
      end
    end
663604
def install(self):
        '''
        
        '''
        remote_path = os.path.join(self.venv, 'requirements.txt')
        put(self.requirements, remote_path)
        run('{pip} install -r {requirements}'.format(
            pip=self.pip(), requirements=remote_path))