Пример #1
0
    def initialize(self):
        require_option(self.options, 'repository-locations')
        venv = self.options.virtualenv

        if venv:
            if self.options.globalinstall:
                LOG.warn('ignoring -g/--globalinstall')
            pyenv = python.VirtualPythonEnvironment(venv)
        else:
            if self.options.globalinstall:
                pyenv = python.GlobalPythonEnvironment()
            else:
                pyenv = python.UserLocalPythonEnvironment()

        # Should we be interactive in CLI?
        interactive = not self.options.non_interactive

        # Find the actual URLs of repositories being used
        mrc = MultiRepositoryConfig(CONF_FILE_GLOBAL, self.options.configfile)
        repo_urls = mrc.get_urls(self.options.repository_locations)
        self.pypmenv = make_pypm_environment2(
            repo_urls,
            pyenv,
            interactive=interactive,
            force=self.options.force,
            )

        LOG.debug("using pythonenv: %s", self.pypmenv.pyenv.root_dir)
        LOG.debug('using repo list: %s', repo_urls)
Пример #2
0
 def initialize(self):
     require_option(self.options, 'foo')
Пример #3
0
 def initialize(self):
     require_option(self.options, 'foo')