Currently a cop-out -- just calls easy_install
178972
def cli(parser):
    '''
    
    '''
    parser.add_argument('-n', '--dry-run', action='store_true', help='Print uninstall actions without running')
    parser.add_argument('packages', nargs='+', help='Packages to install')
    opts = parser.parse_args()

    for package in opts.packages:
        install(package, execute=not opts.dry_run)
518624
def update(self, *pkgs, **kwargs):
        """"""
        cmd_list = ['update', '--json', '--yes']

        if not pkgs and not kwargs.get('all'):
            raise TypeError("Must specify at least one package to update, or "
                            "all=True.")

        cmd_list.extend(
            self._setup_install_commands_from_kwargs(
                kwargs,
                ('dry_run', 'no_deps', 'override_channels',
                 'no_pin', 'force', 'all', 'use_index_cache', 'use_local',
                 'alt_hint')))

        cmd_list.extend(pkgs)

        return self._call_and_parse(cmd_list, abspath=kwargs.get('abspath',
                                                                 True))
1281497
def uninstall(pkg):
    '''
    
    '''
    ret = {'result': None, 'output': ''}

    out = __salt__['cmd.run_all'](FLATPAK_BINARY_NAME + ' uninstall ' + pkg)

    if out['retcode'] and out['stderr']:
        ret['stderr'] = out['stderr'].strip()
        ret['result'] = False
    else:
        ret['stdout'] = out['stdout'].strip()
        ret['result'] = True

    return ret
1135505
function onInterrupted() {
  try {
    if (fs.existsSync(tmpZipFilePath)) {
      fs.unlinkSync(tmpZipFilePath)
    }
    if (fs.existsSync(binPath)) {
      fs.unlinkSync(binPath)
    }
  } catch (e) {
    console.warn(e)
  }
  console.log('install is aborted')
  process.exit(1)
}
186069
def install_alternative(name, target, source, priority=50):
    '''  '''
    if (os.path.exists(target) and not os.path.islink(target)):
        # Move existing file/directory away before installing
        shutil.move(target, '{}.bak'.format(target))
    cmd = [
        'update-alternatives', '--force', '--install',
        target, name, source, str(priority)
    ]
    subprocess.check_call(cmd)
1363118
function install(runtime, abi, platform, arch, cb) {
  const essential = runtime + '-v' + abi + '-' + platform + '-' + arch;
  const pkgVersion = pkg.version;
  const currentPlatform = pkg.name + '-v' + pkgVersion + '-' + essential;

  console.log('Downloading prebuild for platform:', currentPlatform);
  let downloadUrl = 'https://github.com/WilixLead/iohook/releases/download/v' + pkgVersion + '/' + currentPlatform + '.tar.gz';

  let reqOpts = {url: downloadUrl};
  let tempFile = path.join(os.tmpdir(), 'prebuild.tar.gz');
  let req = get(reqOpts, function(err, res) {
    if (err) {
      return onerror(err);
    }
    if (res.statusCode !== 200) {
      if (res.statusCode === 404) {
        console.error('Prebuild for current platform (' + currentPlatform + ') not found!');
        console.error('Try to compile for your platform:');
        console.error('# cd node_modules/iohook;');
        console.error('# npm run compile');
        console.error('');
        return onerror('Prebuild for current platform (' + currentPlatform + ') not found!');
      }
      return onerror('Bad response from prebuild server. Code: ' + res.statusCode);
    }
    pump(res, fs.createWriteStream(tempFile), function(err) {
      if (err) {
        throw err;
      }
      let options = {
        readable: true,
        writable: true,
        hardlinkAsFilesFallback: true
      };
      let binaryName;
      let updateName = function(entry) {
        if (/\.node$/i.test(entry.name)) binaryName = entry.name
      };
      let targetFile = path.join(__dirname, 'builds', essential);
      let extract = tfs.extract(targetFile, options)
        .on('entry', updateName);
      pump(fs.createReadStream(tempFile), zlib.createGunzip(), extract, function(err) {
        if (err) {
          return onerror(err);
        }
        cb()
      })
    })
  });

  req.setTimeout(30 * 1000, function() {
    req.abort()
  })
}
1138365
def freeze():
    '''
    
    '''
    installations = {}
    for dist in get_installed_distributions():
        req = pip.FrozenRequirement.from_dist(dist, [], find_tags=False)
        installations[req.name] = req

    return [str(installation).rstrip() for installation in
        sorted(installations.values(), key=lambda x: x.name.lower())]
866687
def upgrade_available(name, **kwargs):
    '''
    
    '''
    version = None
    cmd = ['pkg', 'list', '-Huv', name]
    lines = __salt__['cmd.run_stdout'](cmd).splitlines()
    if not lines:
        return {}
    ret = {}
    for line in lines:
        ret[_ips_get_pkgname(line)] = _ips_get_pkgversion(line)
    return ret
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)
483562
function install(cleanupHandler, stderrMessages)
{
    if (cleanupHandler) {
        if (typeof cleanupHandler === 'object') {
            stderrMessages = cleanupHandler;
            cleanupHandler = null;
        }
    }
    else if (!stderrMessages)
        stderrMessages = DEFAULT_MESSAGES;
    
    if (stderrMessages) {
        if (messages === null)
            messages = { ctrl_C: '', uncaughtException: '' };
        if (typeof stderrMessages.ctrl_C === 'string')
            messages.ctrl_C = stderrMessages.ctrl_C;
        if (typeof stderrMessages.uncaughtException === 'string')
            messages.uncaughtException = stderrMessages.uncaughtException;
    }
    
    if (cleanupHandlers === null) {
        cleanupHandlers = []; // establish before installing handlers
        
        sigintHandler = signalHandler.bind(this, 'SIGINT');
        sighupHandler = signalHandler.bind(this, 'SIGHUP');
        sigquitHandler = signalHandler.bind(this, 'SIGQUIT');
        sigtermHandler = signalHandler.bind(this, 'SIGTERM');
        
        process.on('SIGINT', sigintHandler);
        process.on('SIGHUP', sighupHandler);
        process.on('SIGQUIT', sigquitHandler);
        process.on('SIGTERM', sigtermHandler);
        process.on('uncaughtException', exceptionHandler);
        process.on('exit', exitHandler);

        cleanupHandlers.push(cleanupHandler || noCleanup);
    }
    else if (cleanupHandler)
        cleanupHandlers.push(cleanupHandler);
}
832243
def update(self, quiet=False, prefix='[polyglot_data] '):
    
    self.clear_status_cache()
    for pkg in self.packages():
      if self.status(pkg) == self.STALE:
        self.download(pkg, quiet=quiet, prefix=prefix)
1346385
def update(**kwargs):
    '''
    
    '''
    stdout = {}

    for mode in ('fetch', 'install'):
        err_ = {}
        ret = _wrapper(mode, err_=err_, **kwargs)
        if 'retcode' in err_ and err_['retcode'] != 0:
            return ret
        if 'stdout' in err_:
            stdout[mode] = err_['stdout']
    return '\n'.join(['{0}: {1}'.format(k, v) for (k, v) in six.iteritems(stdout)])
89290
def install_pip(env, requirements):
    """"""
    try:
        installation_source_folder = config.installation_cache_folder()
        options = setuptools_install_options(installation_source_folder)
        if installation_source_folder is not None:
            zip_eggs_in_folder(installation_source_folder)
        env.execute(["-m", "easy_install"] + options + requirements)
    except (KeyboardInterrupt, SystemExit):
        raise
    except Exception:
        raise EnvironmentSetupError("pip installation failed.")
259511
def upgrade(self, flag):
        
        for pkg in self.binary:
            try:
                subprocess.call("upgradepkg {0} {1}".format(flag, pkg),
                                shell=True)
                check = pkg[:-4].split("/")[-1]
                if os.path.isfile(self.meta.pkg_path + check):
                    print("Completed!\n")
                else:
                    raise SystemExit()
            except subprocess.CalledProcessError:
                self._not_found("Can't upgrade", self.binary, pkg)
                raise SystemExit(1)
1164453
def install
      fail if source_path.nil?
      fail if install_path.nil?
      FileUtils.mkdir_p install_path
      Palimpsest::Utils.copy_directory source_path, install_path
    end
173603
function runSimpleUpgrade (version) {
  return new Promise((resolve) => {
    let npmCommand = (version) ? `npm install -g npm@${version}` : 'npm install -g npm'
    let stdout = []
    let stderr = []
    let child

    try {
      child = spawn('powershell.exe', [ '-NoProfile', '-NoLogo', npmCommand ])
    } catch (error) {
      // This is dirty, but the best way for us to try/catch right now
      resolve({ error })
    }

    child.stdout.on('data', (data) => stdout.push(data.toString()))
    child.stderr.on('data', (data) => stderr.push(data.toString()))

    child.on('exit', () => resolve({ stderr, stdout }))

    child.stdin.end()
  })
}
929106
def do_over():
    ''''''
    path = sys.executable
    args = [path] + sys.argv

    # And the rest, after a sudden wet thud, was silence.
    os.execv(path, args)