Add a buildpack by URL.
510452
def buildpack(self, url):
        """"""
        cmd = ["heroku", "buildpacks:add", url, "--app", self.name]
        self._run(cmd)
992570
def build(python=PYTHON):
    """"""
    clean()
    local(
        "LIBRARY_PATH={library_path} CPATH={include_path} {python} "
        "setup.py build_ext --inplace".format(
            library_path=LIBRARY_PATH,
            include_path=INCLUDE_PATH,
            python=python,
        ))
621292
def setup(app):
    """"""
    app.connect('html-page-context', add_html_link)
    app.connect('build-finished', create_sitemap)
    app.set_translator('html', HTMLTranslator)
    app.sitemap_links = []
702852
def build_assets():
    """"""
    cwd = os.getcwd()
    try:
        from webassets.script import GenericArgparseImplementation
        from django_assets.env import get_env
        prog = "%s assets" % os.path.basename(sys.argv[0])
        impl = GenericArgparseImplementation(
            env=get_env(), log=LOGGER, no_global_options=True, prog=prog)
        impl.run_with_argv(["build"])
    except ImportError:
        pass
    os.chdir(cwd)
1180598
def install_uchroot(_):
    """"""
    builddir = local.path(str(CFG["build_dir"].value))
    with local.cwd(builddir):
        erlent_src = local.path('erlent')
        erlent_git = erlent_src / '.git'
        erlent_repo = str(CFG['uchroot']['repo'])
        erlent_build = erlent_src / 'build'
        if not erlent_git.exists():
            git("clone", erlent_repo)
        else:
            with local.cwd(erlent_src):
                git("pull", "--rebase")

        erlent_build.mkdir()
        with local.cwd(erlent_build):
            cmake("../")
            make()

    os.environ["PATH"] = os.path.pathsep.join(
        [erlent_build, os.environ["PATH"]])
    local.env.update(PATH=os.environ["PATH"])

    if not find_package("uchroot"):
        LOG.error('uchroot not found, after updating PATH to %s',
                  os.environ['PATH'])
        sys.exit(-1)

    env = CFG['env'].value
    if 'PATH' not in env:
        env['PATH'] = []
    env['PATH'].append(str(erlent_build))
1253827
def add_build_tags(self, tags, project, build_id):
        
        route_values = {}
        if project is not None:
            route_values['project'] = self._serialize.url('project', project, 'str')
        if build_id is not None:
            route_values['buildId'] = self._serialize.url('build_id', build_id, 'int')
        content = self._serialize.body(tags, '[str]')
        response = self._send(http_method='POST',
                              location_id='6e6114b2-8161-44c8-8f6c-c5505782427f',
                              version='5.0',
                              route_values=route_values,
                              content=content)
        return self._deserialize('[str]', self._unwrap_collection(response))
144333
function add(elePath, args) {
  const { connect, urlPath } = args;
  const ele = parseElePath(elePath, 'component');
  const tplFile = getTplPath(connect ? 'ConnectedComponent.js.tpl' : 'Component.js.tpl');
  if (vio.fileExists(ele.modulePath)) {
    throw new Error(`Failed to add component: target file already exsited: ${ele.modulePath}`);
  }
  if (vio.fileExists(ele.stylePath)) {
    throw new Error(`Failed to add component: target file already exsited: ${ele.stylePath}`);
  }
  const pre = prefix.getPrefix() ? _.kebabCase(prefix.getPrefix()) + '_' : '';
  template.generate(ele.modulePath, {
    templateFile: tplFile,
    context: Object.assign({ ele, prefix: pre }, args.context || {}),
  });

  style.add(ele, args);
  entry.addToIndex(ele, args);
  if (urlPath) {
    route.add(ele.path, args);
  }
}
1190418
def add_package(package_name, package_path='templates', encoding='utf-8'):
    """"""
    if not _has_jinja:
        raise RuntimeError(_except_text)
    _jload.add_loader(PackageLoader(package_name, package_path, encoding))
875161
def MakeDeployableBinary(self, template_path, output_path):
    """"""
    buildpackage_binary = "/usr/bin/dpkg-buildpackage"
    if not os.path.exists(buildpackage_binary):
      logging.error("dpkg-buildpackage not found, unable to repack client.")
      return

    with utils.TempDirectory() as tmp_dir:
      template_dir = os.path.join(tmp_dir, "dist")
      utils.EnsureDirExists(template_dir)

      zf = zipfile.ZipFile(template_path)
      for name in zf.namelist():
        dirname = os.path.dirname(name)
        utils.EnsureDirExists(os.path.join(template_dir, dirname))
        with open(os.path.join(template_dir, name), "wb") as fd:
          fd.write(zf.read(name))

      # Generate the dpkg files.
      self.GenerateDPKGFiles(tmp_dir)

      # Create a client config.
      client_context = ["Client Context"] + self.context
      client_config_content = self.GetClientConfig(client_context)

      # We need to strip leading /'s or .join will ignore everything that comes
      # before it.
      target_dir = config.CONFIG.Get(
          "ClientBuilder.target_dir", context=self.context).lstrip("/")
      agent_dir = os.path.join(
          template_dir, "debian",
          config.CONFIG.Get("ClientBuilder.package_name", context=self.context),
          target_dir)

      with open(
          os.path.join(
              agent_dir,
              config.CONFIG.Get(
                  "ClientBuilder.config_filename", context=self.context)),
          "wb") as fd:
        fd.write(client_config_content)

      # Set the daemon to executable.
      os.chmod(
          os.path.join(
              agent_dir,
              config.CONFIG.Get("Client.binary_name", context=self.context)),
          0o755)

      arch = config.CONFIG.Get("Template.arch", context=self.context)

      try:
        old_working_dir = os.getcwd()
      except OSError:
        old_working_dir = os.environ.get("HOME", "/tmp")

      try:
        os.chdir(template_dir)
        command = [buildpackage_binary, "-uc", "-d", "-b", "-a%s" % arch]

        try:
          subprocess.check_output(command, stderr=subprocess.STDOUT)
        except subprocess.CalledProcessError as e:
          if "Failed to sign" not in e.output:
            logging.error("Error calling %s.", command)
            logging.error(e.output)
            raise

        filename_base = config.CONFIG.Get(
            "ClientBuilder.debian_package_base", context=self.context)
        output_base = config.CONFIG.Get(
            "ClientRepacker.output_basename", context=self.context)
      finally:
        try:
          os.chdir(old_working_dir)
        except OSError:
          pass

      utils.EnsureDirExists(os.path.dirname(output_path))

      for extension in [
          ".changes",
          config.CONFIG.Get(
              "ClientBuilder.output_extension", context=self.context)
      ]:
        input_name = "%s%s" % (filename_base, extension)
        output_name = "%s%s" % (output_base, extension)

        # TODO(user):pytype: incorrect move() definition in typeshed.
        # pytype: disable=wrong-arg-types
        shutil.move(
            os.path.join(tmp_dir, input_name),
            os.path.join(os.path.dirname(output_path), output_name))
        # pytype: enable=wrong-arg-types

      logging.info("Created package %s", output_path)
      return output_path
590546
public function buildWebPack()
    {
        $assets = $this->getMergedAssets();
        $modules = [];
        $moduleAssets = [];

        $buildPath = $this->config()->getItem('meliscore/ressources');
        $buildPath = $buildPath['build']['build_path'];
        $ds = '/';


        // get the module details via their assets info
        foreach ($assets['css'] as $idx => $asset) {

            $this->setCachedFile($asset);

            $fileFragments = explode($ds, $asset);
            $module = $fileFragments[1] ?? null;

            if ($module) {

                $modulePath = $this->module()->getModulePath($module);

                if ($modulePath) {

                    // check if the build directory for CSS exists
                    $cssBuildPath = $modulePath . $ds . $buildPath . $ds . 'css';
                    if (!file_exists($cssBuildPath)) {
                        @mkdir($cssBuildPath, 0777, true);
                    }

                    // make sure that the file has the right access
                    @chmod($cssBuildPath, 0777);

                    $modules[$module]['path'] = $modulePath;
                    if (preg_match("/$module/", $asset)) {
                        $modules[$module]['css'][] = preg_replace("/\/$module\//", $modulePath . $ds . 'public' . $ds, $asset, 1);
                    }
                }
            }
        }

        foreach ($assets['js'] as $idx => $asset) {

            $this->setCachedFile($asset);

            $fileFragments = explode('/', $asset);
            $module = $fileFragments[1] ?? null;

            if ($module) {

                $modulePath = $this->module()->getModulePath($module);

                if ($modulePath) {
                    // check if the build directory for JS exists
                    $jsBuildPath = $modulePath . $ds . $buildPath . $ds . 'js';
                    if (!file_exists($jsBuildPath)) {
                        @mkdir($jsBuildPath, 0777, true);
                    }

                    // make sure that the file has the right access
                    @chmod($jsBuildPath, 0777);

                    $modules[$module]['path'] = $modulePath;
                    if (preg_match("/$module/", $asset)) {
                        $modules[$module]['js'][] = preg_replace("/\/$module\//", $modulePath . $ds . 'public' . $ds, $asset, 1);
                    }
                }
            }
        }

        $mixScript = $this->mixFilePrefix();


        foreach ($modules as $key => $module) {
            $hasCss = $module['css'] ?? false;
            $hasJs = $module['js'] ?? false;

            $mixScript .= '// ' . $key . PHP_EOL;
            $path = $module['path'] . $ds . 'public' . $ds . 'build' . $ds;
            if ($hasCss) {
                $mixScript .= $this->getMixStyles($module['css'], $path . 'css' . $ds . 'bundle.css');
            }

            if ($hasJs) {
                $mixScript .= $this->getMixScripts($module['js'], $path . 'js' . $ds . 'bundle.js');
            }

        }

        $webPackPath = $_SERVER['DOCUMENT_ROOT'] . $ds;
        $mixScript .= $this->getCached();
        $webpack = $this->getWebPackMixFile();

        file_put_contents($webpack, $mixScript);
        @chmod($webpack, 0777);

        $runWebPackPath = str_replace('public/', '', $webPackPath);

        return "Webpack has been generated in $webpack\r\nRun \"npm run development\" or \"npm run production\" (if you want your assets to be minified) in $runWebPackPath to generate your bundled assets.";

    }
1195202
function buildPack(ret) {
  var src = ret.src;
  var pack = {};

  Object.keys(src).forEach(function(subpath) {
    var file = src[subpath];
    var packTo = file.packTo;

    if (!packTo || file.release === false || file.isPartial) {
      return;
    }

    pack[packTo] = pack[packTo] || [];
    pack[packTo].push(file.subpath);
  });

  return pack;
}
84811
def upload_site(self):
        """"""
        if not os.path.isdir(self._config['build_dir']):
            message = 'Site not built at {0}'.format(self._config['build_dir'])
            self._logger.error(message)
            raise RuntimeError(message)

        ltdclient.upload(self._config)
1296796
function buildBuildList() {
  const buildList = {
    'build/tests.js': allPackages.map(pkg => `packages/${pkg}/test/*.js`)
  };
  allPackages.forEach(pkg => {
    buildList[`packages/${pkg}/dist/${pkg}.js`] = [`packages/${pkg}/globals.js`];
  });
  buildList['packages/demos/dist/demos.js'] = ['packages/demos/src/*.js'];
  return buildList;
}
1090610
def add(self, dist):
        """"""
        new_path = (
            dist.location not in self.paths and (
                dist.location not in self.sitedirs or
                # account for '.' being in PYTHONPATH
                dist.location == os.getcwd()
            )
        )
        if new_path:
            self.paths.append(dist.location)
            self.dirty = True
        Environment.add(self, dist)
1163472
def build_url (self):
        """"""
        super(UnknownUrl, self).build_url()
        if self.is_ignored():
            self.add_info(_("%(scheme)s URL ignored.") %
                          {"scheme": self.scheme.capitalize()})
            self.set_result(_("ignored"))
        else:
            self.set_result(_("URL is unrecognized or has invalid syntax"),
                        valid=False)
856931
def Build(self):
    """"""
    self.SetupVars()
    self.Clean()

    if not os.path.exists(args.grr_src):
      self.GitCheckoutGRR()
    proto_sdist = self.MakeProtoSdist()
    core_sdist = self.MakeCoreSdist()
    client_sdist = self.MakeClientSdist()
    client_builder_sdist = self.MakeClientBuilderSdist()

    self.InstallGRR(proto_sdist)
    self.InstallGRR(core_sdist)
    self.InstallGRR(client_sdist)
    self.InstallGRR(client_builder_sdist)
    self.BuildTemplates()
    if args.test_repack_install:
      self._RepackTemplates()
      self._InstallInstallers()
1282864
def build_install(self):
        
        slackbuilds = self.dependencies + self.master_packages
        installs, upgraded, = [], []
        if not os.path.exists(self.build_folder):
            os.makedirs(self.build_folder)
        if not os.path.exists(self._SOURCES):
            os.makedirs(self._SOURCES)
        os.chdir(self.build_folder)
        for prgnam in slackbuilds:
            if (self.meta.not_downgrade == "on" and
                    self.not_downgrade(prgnam) is True):
                continue
            pkg = "-".join(prgnam.split("-")[:-1])
            installed = "".join(find_package(prgnam, self.meta.pkg_path))
            src_link = SBoGrep(pkg).source().split()
            if (installed and "--download-only" not in self.flag and
                    "--rebuild" not in self.flag):
                self.msg.template(78)
                self.msg.pkg_found(prgnam)
                self.msg.template(78)
            elif self.unst[0] in src_link or self.unst[1] in src_link:
                self.msg.template(78)
                print("| Package {0} {1}{2}{3}".format(
                    prgnam, self.meta.color["RED"], "".join(src_link),
                    self.meta.color["ENDC"]))
                self.msg.template(78)
            else:
                sbo_url = sbo_search_pkg(pkg)
                sbo_link = SBoLink(sbo_url).tar_gz()
                script = sbo_link.split("/")[-1]
                if self.meta.sbosrcarch in ["on", "ON"]:
                    src_link = self.sbosrcarsh(prgnam, sbo_link, src_link)
                Download(self.build_folder, sbo_link.split(),
                         repo="sbo").start()
                Download(self._SOURCES, src_link, repo="sbo").start()
                if "--download-only" in self.flag:
                    continue
                sources = self.filenames(src_link)
                BuildPackage(script, sources, self.build_folder,
                             auto=False).build()
                binary = slack_package(prgnam)
                if os.path.isfile("".join(binary)):
                    if GetFromInstalled(pkg).name() == pkg:
                        print("[ {0}Upgrading{1} ] --> {2}".format(
                            self.meta.color["YELLOW"],
                            self.meta.color["ENDC"], prgnam))
                        upgraded.append(prgnam)
                    else:
                        print("[ {0}Installing{1} ] --> {2}".format(
                            self.meta.color["GREEN"],
                            self.meta.color["ENDC"], prgnam))
                        installs.append(prgnam)
                    if ("--rebuild" in self.flag and
                            GetFromInstalled(pkg).name() == pkg):
                        PackageManager(binary).upgrade(flag="--reinstall")
                    else:
                        PackageManager(binary).upgrade(flag="--install-new")
        return installs, upgraded