本文整理汇总了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
示例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
示例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