Get the builds path. With, optionally, a path to append to the base path.
326677
public function buildsPath(string $path = ''): string
    {
        return $this->basePath('builds'.($path ? DIRECTORY_SEPARATOR.$path : $path));
    }
442846
def get_path_name(self):
        
        path = fix_raw_path(os.path.dirname(os.path.abspath(self.path)))
        name = os.path.basename(self.path)
        return path, name
201206
def build(path: str) -> dict:
    """"""
    update_base_image(path)
    match = file_pattern.search(os.path.basename(path))
    build_id = match.group('id')
    tags = [
        '{}:{}-{}'.format(HUB_PREFIX, version, build_id),
        '{}:latest-{}'.format(HUB_PREFIX, build_id),
        '{}:current-{}'.format(HUB_PREFIX, build_id)
    ]
    if build_id == 'standard':
        tags.append('{}:latest'.format(HUB_PREFIX))

    command = 'docker build --file "{}" {} .'.format(
        path,
        ' '.join(['-t {}'.format(t) for t in tags])
    )

    print('[BUILDING]:', build_id)
    os.system(command)

    return dict(
        id=build_id,
        path=path,
        command=command,
        tags=tags
    )
520641
private String buildPath(List<String> path) {
        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < path.size(); i++) {
            if (i > 0) {
                sb.append('.');
            }

            sb.append(path.get(i));
        }

        return sb.toString();
    }
628676
def build_path(graph, node1, node2, path=None):
    
    if path is None:
        path = []
    if node1 is node2:
        return path
    path.append(node2)
    for pred in graph.all_preds(node2):
        if pred in path:
            continue
        build_path(graph, node1, pred, path)
    return path
397674
def _get_path(cls, path, depth, newstep):
        
        parentpath = cls._get_basepath(path, depth - 1)
        key = cls._int2str(newstep)
        return '{0}{1}{2}'.format(
            parentpath,
            cls.alphabet[0] * (cls.steplen - len(key)),
            key
        )
673205
private String getBasePath(String path1, String path2) {

        StringBuffer base = new StringBuffer();
        path1 = path1.replace('\\', '/');
        path2 = path2.replace('\\', '/');

        String[] parts1 = path1.split("/");
        String[] parts2 = path2.split("/");

        for (int i = 0; i < parts1.length; i++) {
            if (i >= parts2.length) {
                break;
            }
            if (parts1[i].equals(parts2[i])) {
                base.append(parts1[i] + "/");
            }
        }

        return base.toString();
    }
427287
def _get_paths(options):
    
    opts = options

    docroot = path(opts.get('docroot', 'docs'))
    if not docroot.exists():
        raise BuildFailure("Sphinx documentation root (%s) does not exist."
                           % docroot)

    builddir = docroot / opts.get("builddir", ".build")

    srcdir = docroot / opts.get("sourcedir", "")
    if not srcdir.exists():
        raise BuildFailure("Sphinx source file dir (%s) does not exist"
                           % srcdir)

    # Where is the sphinx conf.py file?
    confdir = path(opts.get('confdir', srcdir))

    # Where should output files be generated?
    outdir = opts.get('outdir', '')
    if outdir:
        outdir = path(outdir)
    else:
        outdir = builddir / opts.get('builder', 'html')

    # Where are doctrees cached?
    doctrees = opts.get('doctrees', '')
    if not doctrees:
        doctrees = builddir / "doctrees"
    else:
        doctrees = path(doctrees)

    return Bunch(locals())
1102604
def build_from_path(package, path, dry_run=False, env='default', outfilename=DEFAULT_BUILDFILE):
    
    team, owner, pkg, subpath = parse_package(package, allow_subpath=True)

    if not os.path.exists(path):
        raise CommandException("%s does not exist." % path)

    try:
        if os.path.isdir(path):
            buildpath = os.path.join(path, outfilename)
            if os.path.exists(buildpath):
                raise CommandException(
                    "Build file already exists. Run `quilt build %r` instead." % buildpath
                )

            contents = generate_contents(path, outfilename)
            build_package_from_contents(team, owner, pkg, subpath, path, contents, dry_run=dry_run, env=env)
        else:
            build_package(team, owner, pkg, subpath, path, dry_run=dry_run, env=env)

        if not dry_run:
            print("Built %s successfully." % package)
    except BuildException as ex:
        raise CommandException("Failed to build the package: %s" % ex)
519312
@Override
    public Path build(Path base) throws IOException
    {
        this.dir = base.resolve(name+"-"+version);
        this.debian = dir.resolve("debian");
        control.setStandardsVersion(STANDARDS_VERSION);
        changeLog.set(name, version, release, maintainer);
        control.setSource(name);
        for (FileBuilder fb : fileBuilders)
        {
            fb.build();
        }
        copyright.save(debian);
        control.save(debian);

        changeLog.save(debian);
        // compat
        Path compat = debian.resolve("compat");
        try (BufferedWriter bf = Files.newBufferedWriter(compat, UTF_8))
        {
            bf.append(String.format("%d\n", compatibility));
        }
        for (MaintainerScript ms : maintainerScripts)
        {
            ms.save();
        }
        // rules
        Path rules = debian.resolve("rules");
        FileUtil.copyResource("/rules", rules, DEBBuilder.class);
        PosixHelp.setPermission(rules, "-rwxr-xr-x");
        // source/format
        Path source = debian.resolve("source");
        Files.createDirectories(source);
        Path format = source.resolve("format");
        try (BufferedWriter bf = Files.newBufferedWriter(format, UTF_8))
        {
            bf.append(SOURCE_FORMAT);
        }
        conffiles.save(debian);
        docs.save(debian);
        try
        {
            OSProcess.call(dir, null, "dpkg-buildpackage -us -uc");
        }
        catch (InterruptedException ex)
        {
            throw new IOException(ex);
        }
        return dir;
    }
44866
function getBuildGradlePath() {
    var target = path.join("platforms", "android", "app", "build.gradle");
    if (fs.existsSync(target)) {
        return target;
    }

    return path.join("platforms", "android", "build.gradle");
}
463810
def build_options(self):
        
        if self.version.build_metadata:
            return set(self.version.build_metadata.split('.'))
        else:
            return set()
500064
function getServerBuildDirectory(): string {
  // Generate a random string to ensure uniqueness
  const buildToken = crypto.randomBytes(16).toString('hex');
  return path.resolve(os.tmpdir(), `nucleate-${buildToken}`);
}
290659
def get_path_fields(cls, base=[]):
    
    pfs = []
    for pf in cls.TutelaryMeta.path_fields:
        if pf == 'pk':
            pfs.append(base + ['pk'])
        else:
            f = cls._meta.get_field(pf)
            if isinstance(f, models.ForeignKey):
                pfs += get_path_fields(f.target_field.model, base=base + [pf])
            else:
                pfs.append(base + [f.name])
    return pfs
829020
function buildImportPath(directory, target, baseUrl) {
    // If the base URL option is set then imports should be relative to there.
    const startLocation = baseUrl ? baseUrl : directory.path;
    const relativePath = path_1.default.relative(startLocation, target.path);
    // Get the route and ensure it's relative
    let directoryPath = path_1.default.dirname(relativePath);
    if (directoryPath !== ".") {
        directoryPath = `.${path_1.default.sep}${directoryPath}`;
    }
    // Strip off the .ts or .tsx from the file name.
    const fileName = getBasename(relativePath);
    // Build the final path string. Use posix-style seperators.
    const location = `${directoryPath}${path_1.default.sep}${fileName}`;
    const convertedLocation = utilities_1.convertPathSeparator(location);
    return stripThisDirectory(convertedLocation, baseUrl);
}
981684
def path(self):
        
        return "/".join([
            part
            for part in [
                self.version,
                self.qualifier,
            ]
            if part
        ])
1255254
def path(self, root_dir):
    """"""
    path = os.path.realpath(root_dir)
    if not os.path.exists(path):
      raise ValueError('Build root does not exist: {}'.format(root_dir))
    self._root_dir = path