Builds a package (.pkg) using PackageMaker.
967087
def BuildInstallerPkg(self, output_file):
    """"""
    self.CreateInstallDirs()
    self.InterpolateFiles()
    self.RenameGRRPyinstallerBinaries()
    self.SignGRRPyinstallerBinaries()
    self.WriteClientConfig()
    self.Set755Permissions()
    self.RunPkgBuild()
    self.RunProductBuild()
    self.RenamePkgToTemplate(output_file)
61703
def copy_pkg(self, pkg, src_only=False):
        ""

        if getattr(self, 'no_' + pkg) is None:
            print('Copying boost dependencies')
            to_copy = pkg,
        else:
            return

        src = os.path.join('third_party', *to_copy)

        # copy to the build tree
        if not src_only:
            target = os.path.join(self.build_lib, 'pythran', *to_copy)
            shutil.rmtree(target, True)
            shutil.copytree(src, target)

        # copy them to the source tree too, needed for sdist
        target = os.path.join('pythran', *to_copy)
        shutil.rmtree(target, True)
        shutil.copytree(src, target)
839673
def build_tree(self):
        """"""
        for spec in self.specs:
            if spec.ismodule:
                self.modules.append(Module(spec.name, spec.path, dsm=self))
            else:
                self.packages.append(Package(
                    spec.name, spec.path,
                    dsm=self, limit_to=spec.limit_to,
                    build_tree=True,
                    build_dependencies=False,
                    enforce_init=self.enforce_init))
770875
def refactor_module_to_package(self):
        """"""
        refactor = ModuleToPackage(self.project, self.resource)
        return self._get_changes(refactor)
892429
def _save_cfg_packages(self, data):
        '''
        
        '''
        pkg_id = 0
        pkg_cfg_id = 0
        for pkg_name, pkg_configs in data.items():
            pkg = Package()
            pkg.id = pkg_id
            pkg.name = pkg_name
            self.db.store(pkg)

            for pkg_config in pkg_configs:
                cfg = PackageCfgFile()
                cfg.id = pkg_cfg_id
                cfg.pkgid = pkg_id
                cfg.path = pkg_config
                self.db.store(cfg)
                pkg_cfg_id += 1

            pkg_id += 1
894415
protected function installPackage()
    {
        if ($this->confirm('Do you want publish the pingpong/admin\'s migrations ?')) {
            $this->call('admin:migration');
        }

        if ($this->confirm('Do you want publish the pingpong/trusty\'s migrations ?')) {
            $this->call('vendor:publish', [
                '--provider' => 'Pingpong\Trusty\TrustyServiceProvider',
            ]);
        }

        if ($this->confirm('Do you want run all migrations now ?')) {
            $this->call('migrate');
        }

        if ($this->confirm('Do you want run the pingpong/admin\'s seeders now ?')) {
            $this->call('admin:seed');
        }

        if ($this->confirm('Do you want publish configuration files from pingpong/admin package ?')) {
            $this->call('vendor:publish', [
                '--provider' => 'Pingpong\Admin\AdminServiceProvider',
                ['--tag' => ['config']],
            ]);
        }

        if ($this->confirm('Do you want publish assets from pingpong/admin package ?')) {
            $this->call('vendor:publish', [
                '--provider' => 'Pingpong\Admin\AdminServiceProvider',
                ['--tag' => ['assets']],
            ]);
        }

        if ($this->confirm('Do you want create the app/menus.php file ?')) {
            $this->installMenus();
        }

        $this->call('optimize');
    }
458374
def generate_package(params):
    
    pkg_data = package.PackageData(params)
    pkg_tree = package.PackageTree(pkg_data)
    pkg_tree.generate()
    pkg_tree.move()
    VCS(os.path.join(pkg_tree.outdir, pkg_tree.name), pkg_tree.pkg_data)
387717
def setup_package():
    """"""
    import json
    from setuptools import setup, find_packages

    filename_setup_json = 'setup.json'
    filename_description = 'README.md'

    with open(filename_setup_json, 'r') as handle:
        setup_json = json.load(handle)

    with open(filename_description, 'r') as handle:
        description = handle.read()

    setup(
        include_package_data=True,
        packages=find_packages(),
        setup_requires=['reentry'],
        reentry_register=True,
        long_description=description,
        long_description_content_type='text/markdown',
        **setup_json)
1136392
def build_packages(ctx, hide=False):
    """"""
    print("build_packages:")
    ctx.run("python setup.py sdist bdist_wheel", echo=True, hide=hide)
510452
def buildpack(self, url):
        """"""
        cmd = ["heroku", "buildpacks:add", url, "--app", self.name]
        self._run(cmd)
795551
def dpkg_buildpackage(*args,**kwargs):
    cwd=kwargs.pop('cwd',None)
    if len(kwargs)!=0:
        raise ValueError('only kwarg can be "cwd"')
    ""
    args = ['/usr/bin/dpkg-buildpackage']+list(args)
    process_command(args, cwd=cwd)
17376
function defaultStrategy(projectDir, builder, cb)
{
  const pkg = fs.realpathSync(INSTALLER_PACKAGE);
  builder.buildFromPackage(pkg, projectDir, cb);
}
1216321
public function build()
    {
        $output = Application::getOutput();
        $input = Application::getInput();
        $this->package->setRendererInstance($this->generator->getRenderer());
        $this->package->setApplication(app(Application::class));
        $this->package->setOutputInstance($output);
        $this->package->setInputInstance($input);
        $this->package->builderLoaded();

        if ($this->getCommonTemplateDirectory() !== null) {
            $this->generator->getRenderer()->addPath($this->getCommonTemplateDirectory());
        }

        $this->generator->setVerbatimExcludePatterns($this->package->getVerbatimExcludePatterns());
        $this->generator->setVerbatimPatterns($this->package->getVerbatimPatterns());

        foreach ($this->package->getTransformPaths() as $pathKey => $processPath) {
            $this->generator->getPathManager()->getCollector()->addFileNames([$this->normalizePath($pathKey) => $this->normalizePath($processPath)]);
        }

        foreach ($this->package->getIgnoredPaths() as $ignoredPath) {
            $this->generator->getPathManager()->getGenerator()->addIgnoredPath($this->normalizePath($ignoredPath));
        }

        foreach ($this->package->getPathsToRemove() as $pathToRemove) {
            $this->generator->getPathManager()->getGenerator()->addAutomaticallyRemovedPath($this->normalizePath($pathToRemove));
        }

        $this->generator->addPaths((array)$this->getTemplateDirectory());
        $this->generator->generateContent($this->outputDirectory);
    }
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()
351776
async function build() {
  await run(clean);
  await run(copy);
  await run(bundle);
}
1349004
function buildPackage(callback) {

    var dirMap = self.build.dirMap,
        i = dirMap.length,
        filepath,
        pkgName = '/package.json',
        pkgLength = pkgName.length,
        list = [];

    // search dirmap for package.json
    while(i--) {
      filepath = dirMap[i];
      if (filepath.slice(filepath.length - pkgLength, filepath.length) === pkgName) {
        list.push(filepath);
      }
    }

    function resolvePackage(filepath, callback) {
      var dirname = filepath.slice(0, filepath.length - pkgLength);
      var fullpath = path.resolve(self.piccolo.get('modules'), './' + filepath);

      var response = { key: dirname };

      fs.readFile(fullpath, 'utf8', function (error, content) {
        if (error) return callback(error, null);

        // remove BOM
        content = removeBOM(content);

        // use index if filepath is empty
        var filepath;
        if (content === '') {
          filepath = path.resolve(dirname, 'index.js');
        }

        // read JSON file
        var result;
        try {
          result = JSON.parse(content);
        } catch (e) {
          return callback(e, null);
        }

        if (result.main) {
          filepath = path.resolve(dirname, result.main);
        } else {
          filepath = path.resolve(dirname, './index.js');
        }

        // check that file exist
        var fullpath = path.resolve(self.piccolo.get('modules'), './' + filepath);
        fs.exists(fullpath, function (exist) {
          response.value = exist ? filepath : false;
          callback(null, response);
        });
      });
    }

    // read all package.json files and resolve the filepath
    async.map(list, resolvePackage, function (error, list) {
      if (error) return callback(error, null);

      var final = {};
      list.forEach(function (obj) {
        final[obj.key] = obj.value;
      });

      // save resolved packageMap
      self.build.packageMap = final;
      callback(null, null);
    });
  }
1330710
def apt_install(packages, options=None, fatal=False):
    """"""
    if options is None:
        options = ['--option=Dpkg::Options::=--force-confold']

    cmd = ['apt-get', '--assume-yes']
    cmd.extend(options)
    cmd.append('install')
    if isinstance(packages, six.string_types):
        cmd.append(packages)
    else:
        cmd.extend(packages)
    log("Installing {} with options: {}".format(packages,
                                                options))
    _run_apt_command(cmd, fatal)