Installs required development dependencies. Uses git to checkout other
    modularcrypto repos for more accurate coverage data.
977287
def run():
    

    deps_dir = os.path.join(build_root, 'modularcrypto-deps')
    if os.path.exists(deps_dir):
        shutil.rmtree(deps_dir, ignore_errors=True)
    os.mkdir(deps_dir)

    try:
        print("Staging ci dependencies")
        _stage_requirements(deps_dir, os.path.join(package_root, 'requires', 'ci'))

        print("Checking out modularcrypto packages for coverage")
        for other_package in other_packages:
            pkg_url = 'https://github.com/wbond/%s.git' % other_package
            pkg_dir = os.path.join(build_root, other_package)
            if os.path.exists(pkg_dir):
                print("%s is already present" % other_package)
                continue
            print("Cloning %s" % pkg_url)
            _execute(['git', 'clone', pkg_url], build_root)
        print()

    except (Exception):
        if os.path.exists(deps_dir):
            shutil.rmtree(deps_dir, ignore_errors=True)
        raise

    return True
847690
def install(client, force):
    """"""
    import pkg_resources
    from git.index.fun import hook_path as get_hook_path

    for hook in HOOKS:
        hook_path = Path(get_hook_path(hook, client.repo.git_dir))
        if hook_path.exists():
            if not force:
                click.echo(
                    'Hook already exists. Skipping {0}'.format(str(hook_path)),
                    err=True
                )
                continue
            else:
                hook_path.unlink()

        # Make sure the hooks directory exists.
        hook_path.parent.mkdir(parents=True, exist_ok=True)

        Path(hook_path).write_bytes(
            pkg_resources.resource_string(
                'renku.data', '{hook}.sh'.format(hook=hook)
            )
        )
        hook_path.chmod(hook_path.stat().st_mode | stat.S_IEXEC)
1129727
function(loader, packageJSON, isRoot){
		var deps = crawl.getDependencyMap(loader, packageJSON, isRoot);

		var dependencies = [];
		for(var name in deps) {
			dependencies.push(deps[name]);
		}

		return dependencies;
	}
1313126
def after_install(options, home_dir):
    # --- CUT here ---
    
    if options.install_type==INST_PYPI:
        requirements=NORMAL_INSTALLATION
    elif options.install_type==INST_GIT:
        requirements=GIT_READONLY_INSTALLATION
    elif options.install_type==INST_DEV:
        requirements=DEVELOPER_INSTALLATION
    else:
        # Should never happen
        raise RuntimeError("Install type %r unknown?!?" % options.install_type)

    env_subprocess = EnvSubprocess(home_dir) # from bootstrap_env.bootstrap_install_pip

    logfile = os.path.join(env_subprocess.abs_home_dir, "install.log")

    for requirement in requirements:
        sys.stdout.write("\n\nInstall %r:\n" % requirement)
        env_subprocess.call_env_pip(["install", "--log=%s" % logfile, requirement])
        sys.stdout.write("\n")
1212067
def install(force=False):
    """"""
    ret, git_dir, _ = run("git rev-parse --show-toplevel")
    if ret != 0:
        click.echo(
            "ERROR: Please run from within a GIT repository.",
            file=sys.stderr)
        raise click.Abort
    git_dir = git_dir[0]

    hooks_dir = os.path.join(git_dir, HOOK_PATH)

    for hook in HOOKS:
        hook_path = os.path.join(hooks_dir, hook)
        if os.path.exists(hook_path):
            if not force:
                click.echo(
                    "Hook already exists. Skipping {0}".format(hook_path),
                    file=sys.stderr)
                continue
            else:
                os.unlink(hook_path)

        source = os.path.join(sys.prefix, "bin", "kwalitee-" + hook)
        os.symlink(os.path.normpath(source), hook_path)
    return True
676337
def install_requirements(self, requires):
        
        # Temporarily install dependencies required by setup.py before trying to import them.
        sys.path[0:0] = ['setup-requires']
        pkg_resources.working_set.add_entry('setup-requires')

        to_install = list(self.missing_requirements(requires))
        if to_install:
            cmd = [sys.executable, "-m", "pip", "install",
                "-t", "setup-requires"] + to_install
            subprocess.call(cmd)
1257370
public function install()
    {
        $this->ensureComponentDirectoryExists();
        $this->updatePackages();
        $this->updateWebpackConfiguration();
        $this->updateBootstrapping();
        $this->updateComponent();
        $this->removeNodeModules();
    }
39613
def clone(self):
        
        logger.debug("")
    
        if not self.url:
            estr = "Cannot install this repos without a URL. %s" % self.info()
            logger.warning(estr)
            raise ValueError(estr)

        # check if the already exists, if so, don't install, update it?
        url = urlparse(self.url)
        url_path = url[2]
        path_end = url_path.split('/')
        path_end = path_end[len(path_end) - 1]

        if url.scheme not in self.supported_schemes:
            raise ValueError("Unsupported scheme '{}' for {}".format(url.scheme, self.url))

        assert self.repo_dir, "Invalid repo directory."

        # Clone it.
        logger.debug("cloning %s into %s .", self.url, self.repo_dir)
        self.pr_pass("\nInstalling %s ... " % self.url)

        p = git.clone('--progress', self.url, self.repo_dir,
                      _out=self._sh_stdout('blue'), _err=self._sh_stderr('blue'))
        p.wait()
37721
protected function installDone()
    {
        $this->nl();
        if ($this->seemsFine) {
            $this->output->writeLn("========================================================================");
            $this->nl();
            $this->output->writeLn("                      Repair completed!");
            $this->nl();
            $this->output->writeLn("========================================================================");
        } else {
            $this->output->writeLn("Automatic installation failed to complete cleanly.");
            $this->output->writeLn("Head over to https://github.com/strata-mvc/strata/ to get help.");
        }
        $this->nl();
    }
712810
def install(self):
        
        other_args = list(requirement_args(self._argv, want_other=True))
        archive_path = join(self._temp_path, self._downloaded_filename())
        # -U so it installs whether pip deems the requirement "satisfied" or
        # not. This is necessary for GitHub-sourced zips, which change without
        # their version numbers changing.
        run_pip(['install'] + other_args + ['--no-deps', '-U', archive_path])
827529
def install_reqs(venv, repo_dest):
    """"""
    with dir_path(repo_dest):
        args = ['-r', 'requirements/compiled.txt']
        if not verbose:
            args.insert(0, '-q')
        subprocess.check_call([os.path.join(venv, 'bin', 'pip'), 'install'] +
                              args)
225649
def setup_package():
    
    with open('requirements.txt', 'r') as req_file:
        install_reqs = req_file.read().split('\n')

    cmdclass_ = {'antlr': AntlrBuildCommand}
    cmdclass_.update(versioneer.get_cmdclass())

    setup(
        version=versioneer.get_version(),
        name='pymoca',
        maintainer="James Goppert",
        maintainer_email="james.goppert@gmail.com",
        description=DOCLINES[0],
        long_description="\n".join(DOCLINES[2:]),
        url='https://github.com/pymoca/pymoca',
        author='James Goppert',
        author_email='james.goppert@gmail.com',
        download_url='https://github.com/pymoca/pymoca',
        license='BSD',
        classifiers=[_f for _f in CLASSIFIERS.split('\n') if _f],
        platforms=["Windows", "Linux", "Solaris", "Mac OS-X", "Unix"],
        install_requires=install_reqs,
        tests_require=['coverage >= 3.7.1', 'nose >= 1.3.1'],
        test_suite='nose.collector',
        python_requires='>=3.5',
        packages=find_packages("src"),
        package_dir={"": "src"},
        include_package_data=True,
        cmdclass=cmdclass_
    )
965227
def generate_so_dependencies_files
      `cd #{self.path} && mkdir -p puppet/prepare/dependencies/ubuntu`
      ubuntu_dependencies_content = File.read("#{Bebox::Project.templates_path}/project/ubuntu_dependencies")
      File::open("#{self.path}/puppet/prepare/dependencies/ubuntu/packages", "w")do |f|
        f.write(ubuntu_dependencies_content)
      end
    end
260064
def _update_submodules(repo_dir):
    """"""
    subprocess.check_call("git submodule init", cwd=repo_dir, shell=True)
    subprocess.check_call(
        "git submodule update --recursive", cwd=repo_dir, shell=True)
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');
    }
519545
def _install(_):
    
    if not os.path.exists(".git"):
        fatal("not in a git repo.")

    config = __load_config()

    if config.get("checks") is None:
        fatal("global ``checks`` variable missing from configuration.")

    # We try to load all checks to check that they exist NOW.
    for hook in config["checks"]:
        checks = __load_checks(config["checks"][hook])
        # Also verify that they apply to the hooks.
        __verify_checks_for_hook(checks, hook)

    reply = input("This will overwrite your current hooks. "
                  "Proceed [yes/No]? ")
    if reply != "yes":
        raise Exit(0)

    for hook in config["checks"]:
        hook_f = open(os.path.join(".git/hooks/", hook), 'w')
        hook_f.write("""#!/usr/bin/env python
# GENRATED BY GLERBL. DO NOT MODIFY.
from glerbl.__main__ import main


exit(main(["glerbl", "hook", "{0}"]))
""".format(hook))
        os.fchmod(hook_f.fileno(),
                  os.fstat(hook_f.fileno()).st_mode | stat.S_IXUSR)
        hook_f.close()
1308397
function installRequirements(targetFolder, serverless, options) {
  const targetRequirementsTxt = path.join(targetFolder, 'requirements.txt');

  serverless.cli.log(
    `Installing requirements from ${targetRequirementsTxt} ...`
  );

  const dockerCmd = [];
  const pipCmd = [
    options.pythonBin,
    '-m',
    'pip',
    'install',
    ...options.pipCmdExtraArgs
  ];
  const pipCmds = [pipCmd];
  const postCmds = [];
  // Check if we're using the legacy --cache-dir command...
  if (options.pipCmdExtraArgs.indexOf('--cache-dir') > -1) {
    if (options.dockerizePip) {
      throw 'Error: You can not use --cache-dir with Docker any more, please\n' +
        '         use the new option useDownloadCache instead.  Please see:\n' +
        '         https://github.com/UnitedIncome/serverless-python-requirements#caching';
    } else {
      serverless.cli.log('==================================================');
      serverless.cli.log(
        'Warning: You are using a deprecated --cache-dir inside\n' +
          '            your pipCmdExtraArgs which may not work properly, please use the\n' +
          '            useDownloadCache option instead.  Please see: \n' +
          '            https://github.com/UnitedIncome/serverless-python-requirements#caching'
      );
      serverless.cli.log('==================================================');
    }
  }

  if (!options.dockerizePip) {
    // Push our local OS-specific paths for requirements and target directory
    pipCmd.push(
      '-t',
      dockerPathForWin(targetFolder),
      '-r',
      dockerPathForWin(targetRequirementsTxt)
    );
    // If we want a download cache...
    if (options.useDownloadCache) {
      const downloadCacheDir = path.join(
        getUserCachePath(options),
        'downloadCacheslspyc'
      );
      serverless.cli.log(`Using download cache directory ${downloadCacheDir}`);
      fse.ensureDirSync(downloadCacheDir);
      pipCmd.push('--cache-dir', downloadCacheDir);
    }

    if (pipAcceptsSystem(options.pythonBin)) {
      pipCmd.push('--system');
    }
  }
  // If we are dockerizing pip
  if (options.dockerizePip) {
    // Push docker-specific paths for requirements and target directory
    pipCmd.push('-t', '/var/task/', '-r', '/var/task/requirements.txt');

    // Build docker image if required
    let dockerImage;
    if (options.dockerFile) {
      serverless.cli.log(
        `Building custom docker image from ${options.dockerFile}...`
      );
      dockerImage = buildImage(options.dockerFile);
    } else {
      dockerImage = options.dockerImage;
    }
    serverless.cli.log(`Docker Image: ${dockerImage}`);

    // Prepare bind path depending on os platform
    const bindPath = dockerPathForWin(getBindPath(serverless, targetFolder));

    dockerCmd.push('docker', 'run', '--rm', '-v', `${bindPath}:/var/task:z`);
    if (options.dockerSsh) {
      // Mount necessary ssh files to work with private repos
      dockerCmd.push(
        '-v',
        `${process.env.HOME}/.ssh/id_rsa:/root/.ssh/id_rsa:z`,
        '-v',
        `${process.env.HOME}/.ssh/known_hosts:/root/.ssh/known_hosts:z`,
        '-v',
        `${process.env.SSH_AUTH_SOCK}:/tmp/ssh_sock:z`,
        '-e',
        'SSH_AUTH_SOCK=/tmp/ssh_sock'
      );
    }

    // If we want a download cache...
    const dockerDownloadCacheDir = '/var/useDownloadCache';
    if (options.useDownloadCache) {
      const downloadCacheDir = path.join(
        getUserCachePath(options),
        'downloadCacheslspyc'
      );
      serverless.cli.log(`Using download cache directory ${downloadCacheDir}`);
      fse.ensureDirSync(downloadCacheDir);
      // This little hack is necessary because getBindPath requires something inside of it to test...
      // Ugh, this is so ugly, but someone has to fix getBindPath in some other way (eg: make it use
      // its own temp file)
      fse.closeSync(
        fse.openSync(path.join(downloadCacheDir, 'requirements.txt'), 'w')
      );
      const windowsized = getBindPath(serverless, downloadCacheDir);
      // And now push it to a volume mount and to pip...
      dockerCmd.push('-v', `${windowsized}:${dockerDownloadCacheDir}:z`);
      pipCmd.push('--cache-dir', dockerDownloadCacheDir);
    }

    if (options.dockerEnv) {
      // Add environment variables to docker run cmd
      options.dockerEnv.forEach(function(item) {
        dockerCmd.push('-e', item);
      });
    }

    if (process.platform === 'linux') {
      // Use same user so requirements folder is not root and so --cache-dir works
      if (options.useDownloadCache) {
        // Set the ownership of the download cache dir to root
        pipCmds.unshift(['chown', '-R', '0:0', dockerDownloadCacheDir]);
      }
      // Install requirements with pip
      // Set the ownership of the current folder to user
      pipCmds.push([
        'chown',
        '-R',
        `${process.getuid()}:${process.getgid()}`,
        '/var/task'
      ]);
      if (options.useDownloadCache) {
        // Set the ownership of the download cache dir back to user
        pipCmds.push([
          'chown',
          '-R',
          `${process.getuid()}:${process.getgid()}`,
          dockerDownloadCacheDir
        ]);
      }
    } else {
      // Use same user so --cache-dir works
      dockerCmd.push('-u', getDockerUid(bindPath));
    }
    dockerCmd.push(dockerImage);
  }

  // If enabled slimming, strip so files
  switch (getStripMode(options)) {
    case 'docker':
      pipCmds.push(getStripCommand(options, '/var/task'));
      break;
    case 'direct':
      postCmds.push(getStripCommand(options, dockerPathForWin(targetFolder)));
      break;
  }

  let spawnArgs = { shell: true };
  if (process.env.SLS_DEBUG) {
    spawnArgs.stdio = 'inherit';
  }
  let mainCmds = [];
  if (dockerCmd.length) {
    dockerCmd.push(...mergeCommands(pipCmds));
    mainCmds = [dockerCmd];
  } else {
    mainCmds = pipCmds;
  }
  mainCmds.push(...postCmds);

  serverless.cli.log(`Running ${quote(dockerCmd)}...`);

  filterCommands(mainCmds).forEach(([cmd, ...args]) => {
    const res = spawnSync(cmd, args);
    if (res.error) {
      if (res.error.code === 'ENOENT') {
        const advice =
          cmd.indexOf('python') > -1
            ? 'Try the pythonBin option'
            : 'Please install it';
        throw new Error(`${cmd} not found! ${advice}`);
      }
      throw res.error;
    }
    if (res.status !== 0) {
      throw new Error(res.stderr);
    }
  });
  // If enabled slimming, delete files in slimPatterns
  if (options.slim === true || options.slim === 'true') {
    deleteFiles(options, targetFolder);
  }
}