Install package using distro specific install method.
14052
def install_package(self, client, package):
        
        try:
            out = self.distro.install_package(client, package)
        except Exception as error:
            raise IpaCloudException(
                'Failed installing package, "{0}"; {1}.'.format(
                    package, error
                )
            )
        else:
            self._write_to_log(out)
203900
def install_from_zip(pkgpath, install_path, register_func, delete_after_install=False):
    """"""
    logger.debug("%s is a file, attempting to load zip", pkgpath)
    pkgtempdir = tempfile.mkdtemp(prefix="honeycomb_")
    try:
        with zipfile.ZipFile(pkgpath) as pkgzip:
            pkgzip.extractall(pkgtempdir)
    except zipfile.BadZipfile as exc:
        logger.debug(str(exc))
        raise click.ClickException(str(exc))
    if delete_after_install:
        logger.debug("deleting %s", pkgpath)
        os.remove(pkgpath)
    logger.debug("installing from unzipped folder %s", pkgtempdir)
    return install_dir(pkgtempdir, install_path, register_func, delete_after_install=True)
271760
def install_dir(pkgpath, install_path, register_func, delete_after_install=False):
    
    logger.debug("%s is a directory, attempting to validate", pkgpath)
    plugin = register_func(pkgpath)
    logger.debug("%s looks good, copying to %s", pkgpath, install_path)
    try:
        copy_tree(pkgpath, os.path.join(install_path, plugin.name))
        if delete_after_install:
            logger.debug("deleting %s", pkgpath)
            shutil.rmtree(pkgpath)
        pkgpath = os.path.join(install_path, plugin.name)
    except (OSError, CTError) as exc:
        # TODO: handle package name exists (upgrade? overwrite?)
        logger.debug(str(exc), exc_info=True)
        raise exceptions.PluginAlreadyInstalled(plugin.name)

    return install_deps(pkgpath)
124419
def make_dist(toxinidir, toxdir, package):
    """"""
    dist = os.path.join(toxdir, "dist")
    # Suppress warnings.
    success = safe_shell_out(["python", "setup.py", "sdist", "--quiet",
                              "--formats=zip", "--dist-dir", dist],
                             cwd=toxinidir)
    if success:
        return os.path.join(dist, package + ".zip")
38469
def build_distributions(context):
    """"""
    rmtree('dist', ignore_errors=True)

    build_package_command = 'python setup.py clean sdist bdist_wheel'
    result = shell.dry_run(build_package_command, context.dry_run)
    packages = Path('dist').files() if not context.dry_run else "nothing"

    if not result:
        raise Exception('Error building packages: %s' % result)
    else:
        log.info('Built %s' % ', '.join(packages))
    return packages
786353
def install(self):
        
        binary = slack_package(self.prgnam)
        print("[ {0}Installing{1} ] --> {2}".format(self.green, self.endc,
                                                    self.name))
        PackageManager(binary).upgrade(flag="--install-new")
926885
protected function install()
    {
        // Version-specific.
        $this->maybeRunVsUpgrades();

        // Misc installers.
        $this->createDbTables();
        $this->otherInstallRoutines();
        $this->doFlushRewriteRules();
        $this->maybeEnqueueNotices();

        // History/options.
        $this->updateHistory();
        $this->updateOptions();
    }
32679
def yum_install(**kwargs):
    
    if 'repo' in kwargs:
        repo = kwargs['repo']

    for pkg in list(kwargs['packages']):
        if is_package_installed(distribution='el', pkg=pkg) is False:
            if 'repo' in locals():
                log_green(
                    "installing %s from repo %s ..." % (pkg, repo))
                sudo("yum install -y --quiet --enablerepo=%s %s" % (repo, pkg))
            else:
                log_green("installing %s ..." % pkg)
                sudo("yum install -y --quiet %s" % pkg)
271287
def anitya_specific_distro(config, message, distro=None, *args, **kw):
    

    if not distro:
        return False

    if not anitya_catchall(config, message):
        return False

    d = message['msg'].get('distro', {})
    if d:  # Have to be careful for None here
        if d.get('name', '').lower() == distro.lower():
            return True

    d = None
    p = message['msg'].get('project', {})
    if p:
        d = p.get('distro', {})
    if d:  # Have to be careful for None here
        if d.get('name', '').lower() == distro.lower():
            return True

    for pkg in message['msg'].get('message', {}).get('packages', []):
        if pkg['distro'].lower() == distro.lower():
            return True

    return False
467325
def install_toolset(self, toolset):
        '''
        
        '''
        info = toolset_info[toolset]
        if sys.platform.startswith('linux'):
            os.chdir(self.work_dir)
            if 'ppa' in info:
                for ppa in info['ppa']:
                    utils.check_call(
                        'sudo','add-apt-repository','--yes',ppa)
            if 'deb' in info:
                utils.make_file('sources.list',
                    "deb %s"%(' '.join(info['deb'])),
                    "deb-src %s"%(' '.join(info['deb'])))
                utils.check_call('sudo','bash','-c','cat sources.list >> /etc/apt/sources.list')
            if 'apt-key' in info:
                for key in info['apt-key']:
                    utils.check_call('wget',key,'-O','apt.key')
                    utils.check_call('sudo','apt-key','add','apt.key')
            utils.check_call(
                'sudo','apt-get','update','-qq')
            utils.check_call(
                'sudo','apt-get','install','-qq',info['package'])
            if 'debugpackage' in info and info['debugpackage']:
                utils.check_call(
                    'sudo','apt-get','install','-qq',info['debugpackage'])
522994
def pkg_install(self):
        
        flag = []
        options = [
            "-s",
            "--sync"
        ]
        additional_options = [
            "--resolve-off",
            "--download-only",
            "--directory-prefix=",
            "--case-ins",
            "--rebuild",
            "--reinstall",
            "--patches"
        ]
        for arg in self.args:
            if arg.startswith(additional_options[2]):
                flag.append(arg)
                arg = ""
            if arg in additional_options:
                flag.append(arg)
        # clean from flags
        for ar in flag:
            if ar in self.args:
                self.args.remove(ar)
        if len(self.args) >= 3 and self.args[0] in options:
            if (self.args[1] in self.meta.repositories and
                    self.args[1] not in ["sbo"]):
                BinaryInstall(self.args[2:], self.args[1], flag).start(
                    is_upgrade=False)
            elif (self.args[1] == "sbo" and
                    self.args[1] in self.meta.repositories):
                SBoInstall(self.args[2:], flag).start(is_upgrade=False)
            else:
                usage(self.args[1])
        else:
            usage("")
25115
function install( $package, $installType, $parameters,
                      $name, $os, $filename, $subdirectory,
                      $content, &$installParameters,
                      &$installData )
    {
        //$this->Package =& $package;

        $trans = eZCharTransform::instance();
        $name = $content->getAttribute( 'name' );
        $extensionName = $trans->transformByGroup( $name, 'urlalias' );
        if ( strcmp( $name, $extensionName ) !== 0 )
        {
            $description = ezpI18n::tr( 'kernel/package', 'Package contains an invalid extension name: %extensionname', false, array( '%extensionname' => $name ) );
            $installParameters['error'] = array( 'error_code' => false,
                                                 'element_id' => $name,
                                                 'description' => $description );
            return false;
        }

        $siteINI = eZINI::instance();
        $extensionRootDir = $siteINI->variable( 'ExtensionSettings', 'ExtensionDirectory' );
        $extensionDir = $extensionRootDir . '/' . $extensionName;
        $packageExtensionDir = $package->path() . '/' . $parameters['sub-directory'] . '/' . $extensionName;

        // Error: extension already exists.
        if ( file_exists( $extensionDir ) )
        {
            $description = ezpI18n::tr( 'kernel/package', "Extension '%extensionname' already exists.",
                                   false, array( '%extensionname' => $extensionName ) );
            $choosenAction = $this->errorChoosenAction( self::ERROR_EXISTS,
                                                        $installParameters, $description, $this->HandlerType );
            switch( $choosenAction )
            {
            case self::ACTION_SKIP:
                return true;

            case eZPackage::NON_INTERACTIVE:
            case self::ACTION_REPLACE:
                eZDir::recursiveDelete( $extensionDir );
                break;

            default:
                $installParameters['error'] = array( 'error_code' => self::ERROR_EXISTS,
                                                     'element_id' => $extensionName,
                                                     'description' => $description,
                                                     'actions' => array( self::ACTION_REPLACE => ezpI18n::tr( 'kernel/package', "Replace extension" ),
                                                                         self::ACTION_SKIP => ezpI18n::tr( 'kernel/package', 'Skip' ) ) );
                return false;
            }
        }

        eZDir::mkdir( $extensionDir, false, true );
        eZDir::copy( $packageExtensionDir, $extensionRootDir );

        // Regenerate autoloads for extensions to pick up the newly created extension
        ezpAutoloader::updateExtensionAutoloadArray();

        // Activate extension
        $siteINI = eZINI::instance( 'site.ini', 'settings/override', null, null, false, true );

        if ( $siteINI->hasVariable( 'ExtensionSettings', "ActiveExtensions" ) )
        {
            $selectedExtensions = $siteINI->variable( 'ExtensionSettings', "ActiveExtensions" );
        }
        else
        {
            $selectedExtensions = array();
        }

        if ( !in_array( $extensionName, $selectedExtensions ) )
        {
            $selectedExtensions[] = $extensionName;
            $siteINI->setVariable( "ExtensionSettings", "ActiveExtensions", $selectedExtensions );
            $siteINI->save( 'site.ini.append', '.php', false, false );
        }
        return true;
    }
269760
def install(cmd, packages):
    
    check_cmd(cmd)

    all_pkgs_str = " ".join(all_pkgs)
    print("INSTALLING: " + cmd + " install " + all_pkgs_str)
    subprocess.check_call([cmd, 'install'] + packages)
414854
def install(self):
        
        packages = self.packages()
        if packages:
            print("")   # new line at start
            for pkg in packages:
                ver = SBoGrep(pkg).version()
                prgnam = "{0}-{1}".format(pkg, ver)
                if find_package(prgnam, self.meta.output):
                    binary = slack_package(prgnam)
                    PackageManager(binary).upgrade(flag="--install-new")
                else:
                    print("\nPackage {0} not found in the {1} for "
                          "installation\n".format(prgnam, self.meta.output))
        else:
            print("\nPackages not found in the queue for installation\n")
            raise SystemExit(1)
1245189
def install_python_package(self, arch, name=None, env=None, is_dir=True):
        ''''''
        if env is None:
            env = self.get_recipe_env(arch)

        with current_directory(self.get_build_dir(arch.arch)):
            hostpython = sh.Command(self.ctx.hostpython)

            shprint(hostpython, 'setup.py', 'build_ext', '--static-libpq',
                    _env=env)
            shprint(hostpython, 'setup.py', 'install', '-O2',
                    '--root={}'.format(self.ctx.get_python_install_dir()),
                    '--install-lib=.', _env=env)
943405
public static function install()
    {
        static::updatePackages();
        static::updateBootstrapping();

        tap(new Filesystem, function ($filesystem) {
            $filesystem->deleteDirectory(resource_path('js/components'));
            $filesystem->delete(resource_path('sass/_variables.scss'));
            $filesystem->deleteDirectory(base_path('node_modules'));
            $filesystem->deleteDirectory(public_path('css'));
            $filesystem->deleteDirectory(public_path('js'));
        });
    }
137850
def install(name, link, path, priority):
    '''
    
    '''
    cmd = [_get_cmd(), '--install', link, name, path, six.text_type(priority)]
    out = __salt__['cmd.run_all'](cmd, python_shell=False)
    if out['retcode'] > 0 and out['stderr'] != '':
        return out['stderr']
    return out['stdout']