Return the build directory hierarchy:
        Defines:
        - build: build/chip
        - output: build/output
        - test: build/test/chip
        where chip is the canonical name for the chip passed in
489673
def build_dirs(self):
        

        arch = self.arch_name()

        build_path = os.path.join('build', arch)
        output = os.path.join('build', 'output')
        test = os.path.join('build', 'test', arch)

        return {'build': build_path, 'output': output, 'test': test}
1099909
def get_build_files_family(project_tree, dir_relpath, build_ignore_patterns=None):
    """"""
    build_files = set()
    for build in sorted(project_tree.glob1(dir_relpath, '{prefix}*'.format(prefix=BuildFile._BUILD_FILE_PREFIX))):
      if BuildFile._is_buildfile_name(build) and project_tree.isfile(os.path.join(dir_relpath, build)):
        build_files.add(os.path.join(dir_relpath, build))
    return BuildFile._build_files_from_paths(project_tree, build_files, build_ignore_patterns)
131164
def build_id
      section = section_by_name('.note.gnu.build-id')
      return nil if section.nil?

      note = section.notes.first
      return nil if note.nil?

      note.desc.unpack('H*').first
    end
959224
private String getProjectBuildDirectory()
  {
    return com.sap.prd.mobile.ios.mios.FileUtils.getDelta(project.getBasedir(), new File(project.getBuild()
      .getDirectory()));
  }
1063575
def root_chip(self):
        """"""
        # If not known, query the machine
        if self._root_chip is None:
            self._root_chip = self.get_software_version(255, 255, 0).position
        return self._root_chip
993942
def get_compiler_path():
    
    # If the user provides a specific solc binary let's use that
    given_binary = os.environ.get('SOLC_BINARY')
    if given_binary:
        return given_binary

    for path in os.getenv('PATH', '').split(os.pathsep):
        path = path.strip('"')
        executable_path = os.path.join(path, BINARY)

        if os.path.isfile(executable_path) and os.access(
                executable_path, os.X_OK):
            return executable_path

    return None
837544
def chipqc(bam_file, sample, out_dir):
    """"""
    sample_name = dd.get_sample_name(sample)
    logger.warning("ChIPQC is unstable right now, if it breaks, turn off the tool.")
    if utils.file_exists(out_dir):
        return _get_output(out_dir)
    with tx_tmpdir() as tmp_dir:
        rcode = _sample_template(sample, tmp_dir)
        if rcode:
            # local_sitelib = utils.R_sitelib()
            rscript = utils.Rscript_cmd()
            do.run([rscript, "--no-environ", rcode], "ChIPQC in %s" % sample_name, log_error=False)
            shutil.move(tmp_dir, out_dir)
    return _get_output(out_dir)
354552
def get_build_container_dir(self, arch):
        '''
        '''
        dir_name = self.get_dir_name()
        return join(self.ctx.build_dir, 'other_builds',
                    dir_name, '{}__ndk_target_{}'.format(arch, self.ctx.ndk_api))
795733
def __output_path(toolchain, rule, output_dir):
    """"""
    filename = '%s_%s.json' % (toolchain, rule)
    return os.path.join(output_dir, filename)
523700
def find_build_dir(path, build="_build"):
    """"""
    path = os.path.abspath(os.path.expanduser(path))
    contents = os.listdir(path)
    filtered_contents = [directory for directory in contents
                            if os.path.isdir(os.path.join(path, directory))]

    if build in filtered_contents:
        return os.path.join(path, build)
    else:
        if path == os.path.realpath("/"):
            return None
        else:
            return find_build_dir("{0}/..".format(path), build)
1174567
def sample_out_dir(self):
        
        if self._sample_out_dir is None:
            self._sample_out_dir = os.path.join(
                self.output_dir, self._sample_name
            )
        return self._sample_out_dir
51623
def get_names_and_paths(compiler_output: Dict[str, Any]) -> Dict[str, str]:
    
    return {
        contract_name: make_path_relative(path)
        for path in compiler_output
        for contract_name in compiler_output[path].keys()
    }
1141537
def _get_cache_dir(candidate):
    """"""
    if candidate:
        return candidate

    import distutils.dist  # suppress(import-error)
    import distutils.command.build  # suppress(import-error)
    build_cmd = distutils.command.build.build(distutils.dist.Distribution())
    build_cmd.finalize_options()
    cache_dir = os.path.abspath(build_cmd.build_temp)

    # Make sure that it is created before anyone tries to use it
    try:
        os.makedirs(cache_dir)
    except OSError as error:
        if error.errno != errno.EEXIST:
            raise error

    return cache_dir
582353
def build_indicies
      specs = *map_gems_to_specs(gem_file_list)
      specs.select! { |s| s.class == ::Gem::Specification }
      ::Gem::Specification.dirs = []
      ::Gem::Specification.all = specs

      if ::Gem::VERSION >= '2.5.0'
        build_marshal_gemspecs specs
        build_modern_indices specs if @build_modern
        compress_indices
      else
        build_marshal_gemspecs
        build_modern_indicies if @build_modern
        compress_indicies
      end
    end
344721
def get_output(self, buildroot_id):
        

        def add_buildroot_id(output):
            logfile, metadata = output
            metadata.update({'buildroot_id': buildroot_id})
            return Output(file=logfile, metadata=metadata)

        def add_log_type(output, arch):
            logfile, metadata = output
            metadata.update({'type': 'log', 'arch': arch})
            return Output(file=logfile, metadata=metadata)

        arch = os.uname()[4]
        output_files = [add_log_type(add_buildroot_id(metadata), arch)
                        for metadata in self.get_logs()]

        # Parent of squashed built image is base image
        image_id = self.workflow.builder.image_id
        parent_id = None
        if not self.workflow.builder.base_from_scratch:
            parent_id = self.workflow.builder.base_image_inspect['Id']

        # Read config from the registry using v2 schema 2 digest
        registries = self.workflow.push_conf.docker_registries
        if registries:
            config = copy.deepcopy(registries[0].config)
        else:
            config = {}

        # We don't need container_config section
        if config and 'container_config' in config:
            del config['container_config']

        repositories, typed_digests = self.get_repositories_and_digests()
        tags = set(image.tag for image in self.workflow.tag_conf.images)
        metadata, output = self.get_image_output()

        metadata.update({
            'arch': arch,
            'type': 'docker-image',
            'components': self.get_image_components(),
            'extra': {
                'image': {
                    'arch': arch,
                },
                'docker': {
                    'id': image_id,
                    'parent_id': parent_id,
                    'repositories': repositories,
                    'layer_sizes': self.workflow.layer_sizes,
                    'tags': list(tags),
                    'config': config,
                    'digests': typed_digests
                },
            },
        })

        if self.workflow.builder.base_from_scratch:
            del metadata['extra']['docker']['parent_id']
        if not config:
            del metadata['extra']['docker']['config']
        if not typed_digests:
            del metadata['extra']['docker']['digests']

        # Add the 'docker save' image to the output
        image = add_buildroot_id(output)
        output_files.append(image)

        # add operator manifests to output
        operator_manifests_path = (self.workflow.postbuild_results
                                   .get(PLUGIN_EXPORT_OPERATOR_MANIFESTS_KEY))
        if operator_manifests_path:
            operator_manifests_file = open(operator_manifests_path)
            manifests_metadata = self.get_output_metadata(operator_manifests_path,
                                                          OPERATOR_MANIFESTS_ARCHIVE)
            operator_manifests_output = Output(file=operator_manifests_file,
                                               metadata=manifests_metadata)
            # We use log type here until a more appropriate type name is supported by koji
            operator_manifests_output.metadata.update({'arch': arch, 'type': 'log'})
            operator_manifests = add_buildroot_id(operator_manifests_output)
            output_files.append(operator_manifests)

        return output_files
1260486
def _GetDirectory(self):
    
    if self.entry_type != definitions.FILE_ENTRY_TYPE_DIRECTORY:
      return None
    return TSKPartitionDirectory(self._file_system, self.path_spec)
327456
def build(self, output_path=""):
        """"""

        self.output_path = self.checkOutputPath(output_path)
        self._buildStaticFiles()
        self.final_url = self._buildTemplates()
        printDebug("Done.", "comment")
        printDebug("=> %s" % (self.final_url), "comment")
        return self.final_url