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


Python URI.uri方法代码示例

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


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

示例1: prepare_for_build

# 需要导入模块: from pisi.uri import URI [as 别名]
# 或者: from pisi.uri.URI import uri [as 别名]
def prepare_for_build(pspecfile, authInfo=None):

    # FIXME: there is a function named "build" in this module which
    # makes it impossible to use build module directly.
    from build import PisiBuild

    url = URI(pspecfile)
    if url.is_remote_file():
        from sourcefetcher import SourceFetcher
        fs = SourceFetcher(url, authInfo)
        url.uri = fs.fetch_all()

    pb = PisiBuild(url.uri)

    # find out the build dependencies that are not satisfied...
    dep_unsatis = []
    for dep in pb.spec.source.buildDeps:
        if not dependency.installed_satisfies_dep(dep):
            dep_unsatis.append(dep)

    # FIXME: take care of the required buildDeps...
    # For now just report an error!
    if dep_unsatis:
        ctx.ui.error(_("Unsatisfied Build Dependencies:"))
        for dep in dep_unsatis:
            ctx.ui.warning(dep.package)

    # FIXME: Don't exit for now! It's annoying to test on a system that
    # doesn't has all packages made with pisi.
    # Will be enabled on the full-pisi system.
    #        sys.exit(1)

    return pb
开发者ID:Tayyib,项目名称:uludag,代码行数:35,代码来源:api.py

示例2: prepare_for_build

# 需要导入模块: from pisi.uri import URI [as 别名]
# 或者: from pisi.uri.URI import uri [as 别名]
def prepare_for_build(pspecfile, authInfo=None):

    url = URI(pspecfile)
    if url.is_remote_file():
        from sourcefetcher import SourceFetcher
        fs = SourceFetcher(url, authInfo)
        url.uri = fs.fetch_all()

    import pisi.build
    pb = pisi.build.Builder(url.uri)

    return pb
开发者ID:dhirajkhatiwada1,项目名称:uludag,代码行数:14,代码来源:api.py

示例3: prepare_for_build

# 需要导入模块: from pisi.uri import URI [as 别名]
# 或者: from pisi.uri.URI import uri [as 别名]
def prepare_for_build(pspecfile, authInfo=None):

    # FIXME: there is a function named "build" in this module which
    # makes it impossible to use build module directly.
    from build import PisiBuild

    url = URI(pspecfile)
    if url.is_remote_file():
        from sourcefetcher import SourceFetcher
        fs = SourceFetcher(url, authInfo)
        url.uri = fs.fetch_all()

    pb = PisiBuild(url.uri)
    return pb
开发者ID:Tayyib,项目名称:uludag,代码行数:16,代码来源:api.py


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