Build relocation for the module variable.
160018
def c_module_relocs(self):
        """"""
        if self.opts.no_structs or self.opts.windll:
            return '', ''
        x86 = reloc_var(
            self.name, self._c_struct_names()[1],
            self.opts.reloc_delta,
            self._c_uses_pointer()
        )
        x64 = '{0} *{1} = &_{1};\n'.format(
            self._c_struct_names()[1], self.name
        ) if self._c_uses_pointer() else ''
        return x86, x64
142439
def _move_modules(self, temp_repo, destination):
        
        folders = self._get_module_folders(temp_repo)
        for folder in folders:
            force_move(folder, destination)
1340604
def _update_init_all(module_path, r):
    """"""
    module_dir_path = os.path.split(module_path)[0]
    module_list = []
    for item_name in os.listdir(module_dir_path):
        item_path = os.path.join(module_dir_path, item_name)
        if os.path.isfile(item_path) and item_name in ('__init__.py', 'setup.py'):
            continue
        if os.path.isfile(item_path) and not item_name.endswith('.py'):
            continue
        # if os.path.isdir(item_path) and not os.path.isfile(
        #     os.path.join(item_path, '__init__.py')
        # ):
        #   continue
        if os.path.isdir(item_path):
            continue
        module_list.append(re.sub(r'.py$', '', item_name).encode('utf-8'))
    module_literal_str = str(sorted(module_list))

    assignment_node_list = r('AssignmentNode', recursive=False)
    for n in assignment_node_list:
        if n.type == 'assignment' and n.target.value == '__all__':
            n.value = module_literal_str
            break
    else:
        r.node_list.append(
            redbaron.RedBaron('__all__ = {}\n'.format(module_literal_str))
        )
    return r
739159
def Copy(From, To):
    
    from benchbuild.utils.cmd import cp
    cp("-ar", "--reflink=auto", From, To)
746270
def _construct_module(info, target):
    """"""

    for path in paths:
        real_path = os.path.abspath(os.path.join(target, path.format(**info)))
        log("Making directory '%s'" % real_path)
        os.makedirs(real_path)

    # pprint(info)
    for item in templates.values():
        source = os.path.join('dev/templates', item[0])
        filename = os.path.abspath(
            os.path.join(target, item[1].format(**info)))
        log("Creating file from template '%s'" % filename,
            emitter='MANAGE')
        write_template_file(source, filename, info)
622771
function build(mode, system, cdef, out, cb) {
    logger.info('building');
    out.stdout('building');
    cb();
  }
321273
def build(ctx, max_revisions, targets, operators, archiver):
    """"""
    config = ctx.obj["CONFIG"]

    from wily.commands.build import build

    if max_revisions:
        logger.debug(f"Fixing revisions to {max_revisions}")
        config.max_revisions = max_revisions

    if operators:
        logger.debug(f"Fixing operators to {operators}")
        config.operators = operators.strip().split(",")

    if archiver:
        logger.debug(f"Fixing archiver to {archiver}")
        config.archiver = archiver

    if targets:
        logger.debug(f"Fixing targets to {targets}")
        config.targets = targets

    build(
        config=config,
        archiver=resolve_archiver(config.archiver),
        operators=resolve_operators(config.operators),
    )
    logger.info(
        "Completed building wily history, run `wily report <file>` or `wily index` to see more."
    )
770875
def refactor_module_to_package(self):
        """"""
        refactor = ModuleToPackage(self.project, self.resource)
        return self._get_changes(refactor)
833494
protected function copyModule(): void
    {
        foreach (self::DIRECTORIES as $directory) {
            $this->copy(
                $this->packagePath . DS . $directory . DS,
                PATH_ROOT . DS . $directory . DS
            );
        }

        $this->installer->getIo()->write(
            sprintf(
                '  - Copied <comment>%s</comment> module to application',
                basename($this->packagePath)
            ),
            true
        );
    }
747666
function Buildit(opts) {
	opts = opts || {};

	this.cwd = opts.baseUrl || process.cwd();
	this.name = opts.name;
	this.locals = {};
	this.externals = [];

	if (opts.define) {
		this.define = opts.define;
	}

	if (opts.exports) {
		this.exports = opts.exports;
	}

	if (opts.extensions) {
		this.extensions = opts.extensions;
	}
}
258352
def prepare_build_dir(self):
        ''''''
        self.build_dir = self.get_build_dir()
        self.common_dir = self.get_common_dir()
        copy_files(join(self.bootstrap_dir, 'build'), self.build_dir)
        copy_files(join(self.common_dir, 'build'), self.build_dir,
                   override=False)
        if self.ctx.symlink_java_src:
            info('Symlinking java src instead of copying')
            shprint(sh.rm, '-r', join(self.build_dir, 'src'))
            shprint(sh.mkdir, join(self.build_dir, 'src'))
            for dirn in listdir(join(self.bootstrap_dir, 'build', 'src')):
                shprint(sh.ln, '-s', join(self.bootstrap_dir, 'build', 'src', dirn),
                        join(self.build_dir, 'src'))
        with current_directory(self.build_dir):
            with open('project.properties', 'w') as fileh:
                fileh.write('target=android-{}'.format(self.ctx.android_api))
619044
public void copyPackagesExcept(BuildState prev, Set<String> recompiled, Set<String> removed) {
        for (String pkg : prev.packages().keySet()) {
            // Do not copy recompiled or removed packages.
            if (recompiled.contains(pkg) || removed.contains(pkg)) continue;
            Module mnew = findModuleFromPackageName(pkg);
            Package pprev = prev.packages().get(pkg);
            mnew.addPackage(pprev);
            // Do not forget to update the flattened data.
            packages.put(pkg, pprev);
        }
    }
525369
function modGetModulesExports( modules, buildinModules ) {
        var args = [];
        each(
            modules,
            function ( id, index ) {
                args[ index ] =
                    buildinModules[ id ]
                    || modGetModuleExports( id );
            }
        );

        return args;
    }
299947
def copy_module		
      src = "#{@gem_path}/lib/modules/#{@module_name}/#{@module_name}_apis.rb"
      dest = "#{@target_dir}/app/apis/#{@project_name}/modules"
      presence = File.exists?("#{dest}/#{@module_name}_apis.rb")? true : false
      FileUtils.mkdir dest unless File.exists?(dest)
      FileUtils.cp(src,dest) unless presence
      configure_module_files
      $stdout.puts "\e[1;32m \tcreate\e[0m\tapp/apis/#{@project_name}/modules/#{@module_name}_apis.rb" unless presence
    end
1361615
def transform_conf_module(cls):
  """"""
  global CONF_NODE

  if cls.name == 'openhtf.conf':
    # Put all the attributes in Configuration into the openhtf.conf node.
    cls._locals.update(cls.locals['Configuration'][0].locals)

    # Store reference to this node for future use.
    CONF_NODE = cls
    CONF_LOCALS.update(cls.locals)
896445
function build(mode, system, cdef, out, cb) {
    logger.info('building');
    out.stdout('--> building');

    builder.build(mode, system, cdef, out, function(err, specific) {
      if (err) { logger.error(err); return cb(err); }
      cb(err);
    });
  }
131044
def _module_env(self, execution):
        
        env = copy.copy(os.environ)
        try:
            for mod in execution.get('modules') or []:
                Module.load(mod)
            os.environ.update(execution.get('environment') or {})
            yield
        finally:
            os.environ = env