我们从Python开源项目中,提取了以下14个代码示例,用于说明如何使用setuptools.package_index.PackageIndex()。
def _do_upgrade(self, dist): # Build up a requirement for a higher bugfix release but a lower minor # release (so API compatibility is guaranteed) next_version = _next_version(dist.parsed_version) req = pkg_resources.Requirement.parse( '{0}>{1},<{2}'.format(DIST_NAME, dist.version, next_version)) package_index = PackageIndex(index_url=self.index_url) upgrade = package_index.obtain(req) if upgrade is not None: return self._do_download(version=upgrade.version)
def initialize_options(self): self.bdist_base = None self.dist_dir = None self.format = None self.keep_temp = False self.name_prefix = None self.package_index = PackageIndex() self.requirements_mapping = None self.selected_options = None self.use_pypi_deps = False self.use_wheel = False self.with_py_prefix = False self.initialize_manifest_options()