当前位置: 首页>>代码示例>>Python>>正文


Python index.PackageFinder方法代码示例

本文整理汇总了Python中pip.index.PackageFinder方法的典型用法代码示例。如果您正苦于以下问题:Python index.PackageFinder方法的具体用法?Python index.PackageFinder怎么用?Python index.PackageFinder使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pip.index的用法示例。


在下文中一共展示了index.PackageFinder方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _build_package_finder

# 需要导入模块: from pip import index [as 别名]
# 或者: from pip.index import PackageFinder [as 别名]
def _build_package_finder(self, options, session,
                              platform=None, python_versions=None,
                              abi=None, implementation=None):
        """
        Create a package finder appropriate to this requirement command.
        """
        index_urls = [options.index_url] + options.extra_index_urls
        if options.no_index:
            logger.debug('Ignoring indexes: %s', ','.join(index_urls))
            index_urls = []

        return PackageFinder(
            find_links=options.find_links,
            format_control=options.format_control,
            index_urls=index_urls,
            trusted_hosts=options.trusted_hosts,
            allow_all_prereleases=options.pre,
            process_dependency_links=options.process_dependency_links,
            session=session,
            platform=platform,
            versions=python_versions,
            abi=abi,
            implementation=implementation,
        ) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:26,代码来源:basecommand.py

示例2: _build_package_finder

# 需要导入模块: from pip import index [as 别名]
# 或者: from pip.index import PackageFinder [as 别名]
def _build_package_finder(self, options, session):
        """
        Create a package finder appropriate to this requirement command.
        """
        index_urls = [options.index_url] + options.extra_index_urls
        if options.no_index:
            logger.info('Ignoring indexes: %s', ','.join(index_urls))
            index_urls = []

        return PackageFinder(
            find_links=options.find_links,
            format_control=options.format_control,
            index_urls=index_urls,
            trusted_hosts=options.trusted_hosts,
            allow_all_prereleases=options.pre,
            process_dependency_links=options.process_dependency_links,
            session=session,
        ) 
开发者ID:jpush,项目名称:jbox,代码行数:20,代码来源:basecommand.py

示例3: _build_package_finder

# 需要导入模块: from pip import index [as 别名]
# 或者: from pip.index import PackageFinder [as 别名]
def _build_package_finder(self, options, index_urls, session):
        """
        Create a package finder appropriate to this install command.
        This method is meant to be overridden by subclasses, not
        called directly.
        """
        return PackageFinder(find_links=options.find_links,
                             index_urls=index_urls,
                             use_wheel=options.use_wheel,
                             allow_external=options.allow_external,
                             allow_unverified=options.allow_unverified,
                             allow_all_external=options.allow_all_external,
                             allow_all_prereleases=options.pre,
                             process_dependency_links=
                                options.process_dependency_links,
                             session=session,
                            ) 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:19,代码来源:install.py

示例4: _build_package_finder

# 需要导入模块: from pip import index [as 别名]
# 或者: from pip.index import PackageFinder [as 别名]
def _build_package_finder(self, options, index_urls, session):
        """
        Create a package finder appropriate to this install command.
        This method is meant to be overridden by subclasses, not
        called directly.
        """
        return PackageFinder(
            find_links=options.find_links,
            format_control=options.format_control,
            index_urls=index_urls,
            allow_external=options.allow_external,
            allow_unverified=options.allow_unverified,
            allow_all_external=options.allow_all_external,
            trusted_hosts=options.trusted_hosts,
            allow_all_prereleases=options.pre,
            process_dependency_links=options.process_dependency_links,
            session=session,
        ) 
开发者ID:chalasr,项目名称:Flask-P2P,代码行数:20,代码来源:install.py

示例5: run

# 需要导入模块: from pip import index [as 别名]
# 或者: from pip.index import PackageFinder [as 别名]
def run(self, package_name):

        # PackageFinder requires session which requires options

        options, args = self.parse_args([])
        session = self._build_session(options=options)
        
        finder = PackageFinder(
            find_links=[],
            index_urls=['https://pypi.python.org/simple/'],
            session=session,
        )
       
        candidates = finder.find_all_candidates(package_name)
        
        # set() to remove repeated versions - ie. matplotlib
        versions = sorted(set(c.version for c in candidates))
        
        print('\n'.join(map(str, versions))) 
开发者ID:furas,项目名称:python-examples,代码行数:21,代码来源:pip-all-versions.py

示例6: _build_package_finder

# 需要导入模块: from pip import index [as 别名]
# 或者: from pip.index import PackageFinder [as 别名]
def _build_package_finder(self, options, index_urls, session):
        """
        Create a package finder appropriate to this list command.
        """
        return PackageFinder(
            find_links=options.find_links,
            index_urls=index_urls,
            allow_all_prereleases=options.pre,
            trusted_hosts=options.trusted_hosts,
            process_dependency_links=options.process_dependency_links,
            session=session,
        ) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:14,代码来源:list.py


注:本文中的pip.index.PackageFinder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。